diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time')
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/conversions.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index 3945fe8f8c..7829c2e581 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -29,11 +29,12 @@ module ActiveSupport #:nodoc: end end + # Converts self to a Ruby Date object; time portion is discarded def to_date ::Date.new(year, month, day) end - # To be able to keep Dates and Times interchangeable on conversions + # To be able to keep Times, Dates and DateTimes interchangeable on conversions def to_time self end |