Permalink
Browse files

Merge pull request #11681 from gzohari/pr-refactor-date-time

Remove duplication from date_time calculations
  • Loading branch information...
2 parents 4ae5d4d + 89060b8 commit 742d1f2eda24dd411e018835680645d3921883f5 @pixeltrix pixeltrix committed Jul 31, 2013
Showing with 0 additions and 10 deletions.
  1. +0 −10 activesupport/lib/active_support/core_ext/date_time/calculations.rb
@@ -10,16 +10,6 @@ def current
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)

0 comments on commit 742d1f2

Please sign in to comment.