diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-07-31 06:23:46 -0700 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-07-31 06:23:46 -0700 |
commit | 742d1f2eda24dd411e018835680645d3921883f5 (patch) | |
tree | dfaebb4c1a337f07c8fc6558eac8be7a582ba2e2 | |
parent | 4ae5d4d34e06c62cd693d0f8e3c7a5da51a9b26a (diff) | |
parent | 89060b8ef9b56e69e5f28754b5b633f6c8b8c909 (diff) | |
download | rails-742d1f2eda24dd411e018835680645d3921883f5.tar.gz rails-742d1f2eda24dd411e018835680645d3921883f5.tar.bz2 rails-742d1f2eda24dd411e018835680645d3921883f5.zip |
Merge pull request #11681 from gzohari/pr-refactor-date-time
Remove duplication from date_time calculations
-rw-r--r-- | activesupport/lib/active_support/core_ext/date_time/calculations.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/core_ext/date_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_time/calculations.rb index c288a1f9bd..8e5d723074 100644 --- a/activesupport/lib/active_support/core_ext/date_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_time/calculations.rb @@ -10,16 +10,6 @@ class DateTime end end - # Tells whether the DateTime object's datetime lies in the past. - def past? - self < ::DateTime.current - end - - # Tells whether the DateTime object's datetime lies in the future. - def future? - self > ::DateTime.current - end - # Seconds since midnight: DateTime.now.seconds_since_midnight. def seconds_since_midnight sec + (min * 60) + (hour * 3600) |