提交 df508bd9 编写于 作者: X Xavier Noria

aliases Date#sunday to Date#end_of_week, for symmetry with existing alias...

aliases Date#sunday to Date#end_of_week, for symmetry with existing alias Date#monday -> Date#beginning_of_week
上级 2969543c
*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 @@ def end_of_week
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).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册