mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
aliases Date#sunday to Date#end_of_week, for symmetry with existing alias Date#monday -> Date#beginning_of_week
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*Rails 3.0.0 [beta 4/release candidate] (unreleased)*
|
||||
|
||||
* Aliases Date#sunday to Date#end_of_week. [fxn]
|
||||
|
||||
* Backports Date#>> from 1.9 so that calculations do the right thing around the calendar reform. [fxn]
|
||||
|
||||
* Date#to_time handles properly years in the range 0..138. [fxn]
|
||||
|
||||
@@ -181,6 +181,7 @@ class Date
|
||||
result = self + days_to_sunday.days
|
||||
self.acts_like?(:time) ? result.end_of_day : result
|
||||
end
|
||||
alias :sunday :end_of_week
|
||||
alias :at_end_of_week :end_of_week
|
||||
|
||||
# Returns a new Date/DateTime representing the start of the given day in next week (default is Monday).
|
||||
|
||||
Reference in New Issue
Block a user