aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-09-18 17:18:20 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2015-09-18 17:18:20 +0200
commit4fac20688b190da9da741e4a6d65d2adfab40772 (patch)
tree82c8ba03a090254f7226a8f7281ac8ebb5ba0dbd /activesupport
parente80b39c390c4fef3669f0341b30ae4741674f09c (diff)
parent8913432b2831208d4a3face0b29b7f91de49fbe0 (diff)
downloadrails-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.rb6
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