Skip to content

Commit 742d1f2

Browse files
committed
Merge pull request rails#11681 from gzohari/pr-refactor-date-time
Remove duplication from date_time calculations
2 parents 4ae5d4d + 89060b8 commit 742d1f2

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

activesupport/lib/active_support/core_ext/date_time/calculations.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ def current
1010
end
1111
end
1212

13-
# Tells whether the DateTime object's datetime lies in the past.
14-
def past?
15-
self < ::DateTime.current
16-
end
17-
18-
# Tells whether the DateTime object's datetime lies in the future.
19-
def future?
20-
self > ::DateTime.current
21-
end
22-
2313
# Seconds since midnight: DateTime.now.seconds_since_midnight.
2414
def seconds_since_midnight
2515
sec + (min * 60) + (hour * 3600)

0 commit comments

Comments
 (0)