提交 99ff8fda 编写于 作者: V Vijay Dev

minor doc changes

上级 f7545216
......@@ -193,9 +193,9 @@ def beginning_of_week(start_day = :monday)
alias :monday :beginning_of_week
alias :at_beginning_of_week :beginning_of_week
# Returns a new +Date+/+DateTime+ representing the end of this week, week
# starts on +start_day+, default is +:monday+. +DateTime+ objects have their
# time set to 23:59:59).
# Returns a new +Date+/+DateTime+ representing the end of this week. Week is
# assumed to start on +start_day+, default is +:monday+. +DateTime+ objects
# have their time set to 23:59:59.
def end_of_week(start_day = :monday)
days_to_end = 6 - days_to_week_start(start_day)
result = self + days_to_end.days
......
......@@ -3041,7 +3041,7 @@ h6. +beginning_of_week+, +end_of_week+
The methods +beginning_of_week+ and +end_of_week+ return the dates for the
beginning and end of the week, respectively. Weeks are assumed to start on
Monday, but that can be changed passing an argument, see examples:
Monday, but that can be changed passing an argument.
<ruby>
d = Date.new(2010, 5, 8) # => Sat, 08 May 2010
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册