diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-09-18 17:18:20 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-09-18 17:18:20 +0200 |
commit | 4fac20688b190da9da741e4a6d65d2adfab40772 (patch) | |
tree | 82c8ba03a090254f7226a8f7281ac8ebb5ba0dbd /activesupport | |
parent | e80b39c390c4fef3669f0341b30ae4741674f09c (diff) | |
parent | 8913432b2831208d4a3face0b29b7f91de49fbe0 (diff) | |
download | rails-4fac20688b190da9da741e4a6d65d2adfab40772.tar.gz rails-4fac20688b190da9da741e4a6d65d2adfab40772.tar.bz2 rails-4fac20688b190da9da741e4a6d65d2adfab40772.zip |
Merge pull request #21662 from amitsuroliya/improve_docs
Corrected `to_time` output in ActiveSupport Date Conversion docs [ci …
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/date/conversions.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/date/conversions.rb b/activesupport/lib/active_support/core_ext/date/conversions.rb index 31479a1269..ed8bca77ac 100644 --- a/activesupport/lib/active_support/core_ext/date/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date/conversions.rb @@ -75,10 +75,10 @@ class Date # # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 # - # date.to_time # => Sat Nov 10 00:00:00 0800 2007 - # date.to_time(:local) # => Sat Nov 10 00:00:00 0800 2007 + # date.to_time # => 2007-11-10 00:00:00 0800 + # date.to_time(:local) # => 2007-11-10 00:00:00 0800 # - # date.to_time(:utc) # => Sat Nov 10 00:00:00 UTC 2007 + # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC def to_time(form = :local) ::Time.send(form, year, month, day) end |