Add missing at_end_of_* aliases

This commit is contained in:
Andrew White 2012-12-11 06:47:47 +00:00
parent 331a82a1c8
commit 681697813b
3 changed files with 5 additions and 0 deletions

@ -75,6 +75,7 @@ def beginning_of_day
def end_of_day
to_time_in_current_zone.end_of_day
end
alias :at_end_of_day :end_of_day
def plus_with_duration(other) #:nodoc:
if ActiveSupport::Duration === other

@ -110,6 +110,7 @@ def beginning_of_day
def end_of_day
change(:hour => 23, :min => 59, :sec => 59)
end
alias :at_end_of_day :end_of_day
# Returns a new DateTime representing the start of the hour (hh:00:00).
def beginning_of_hour
@ -121,6 +122,7 @@ def beginning_of_hour
def end_of_hour
change(:min => 59, :sec => 59)
end
alias :at_end_of_hour :end_of_hour
# Adjusts DateTime to UTC by adding its offset value; offset is set to 0.
#

@ -160,6 +160,7 @@ def end_of_day
:usec => Rational(999999999, 1000)
)
end
alias :at_end_of_day :end_of_day
# Returns a new Time representing the start of the hour (x:00)
def beginning_of_hour
@ -175,6 +176,7 @@ def end_of_hour
:usec => Rational(999999999, 1000)
)
end
alias :at_end_of_hour :end_of_hour
# Returns a Range representing the whole day of the current time.
def all_day