mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/time.rb: [DOC] Correcting rdoc visibility of time.rb constants
Reported by Tanaka Akira [ruby-core:56517] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3a589c6979
commit
2e04bc776c
2 changed files with 10 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Aug 11 10:40:48 2013 Zachary Scott <e@zzak.io>
|
||||||
|
|
||||||
|
* lib/time.rb: [DOC] Correcting rdoc visibility of time.rb constants
|
||||||
|
Reported by Tanaka Akira [ruby-core:56517]
|
||||||
|
|
||||||
Sun Aug 11 04:48:14 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
Sun Aug 11 04:48:14 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* file.c (rb_str_normalize_ospath):
|
* file.c (rb_str_normalize_ospath):
|
||||||
|
|
21
lib/time.rb
21
lib/time.rb
|
@ -174,10 +174,8 @@ class Time
|
||||||
end
|
end
|
||||||
private :zone_utc?
|
private :zone_utc?
|
||||||
|
|
||||||
# An array with the number of days per month in a leap year.
|
LeapYearMonthDays = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] # :nodoc:
|
||||||
LeapYearMonthDays = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
CommonYearMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] # :nodoc:
|
||||||
# An array with the number of days per month in a regular year.
|
|
||||||
CommonYearMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
|
||||||
def month_days(y, m)
|
def month_days(y, m)
|
||||||
if ((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)
|
if ((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)
|
||||||
LeapYearMonthDays[m-1]
|
LeapYearMonthDays[m-1]
|
||||||
|
@ -403,14 +401,7 @@ class Time
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
MonthValue = { # :nodoc:
|
||||||
# A hash of upcased RFC2822 month-names mapped to number of the month.
|
|
||||||
# For example:
|
|
||||||
#
|
|
||||||
# Time.MonthValue['JAN']
|
|
||||||
# #=> 1
|
|
||||||
#
|
|
||||||
MonthValue = {
|
|
||||||
'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6,
|
'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6,
|
||||||
'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' =>10, 'NOV' =>11, 'DEC' =>12
|
'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' =>10, 'NOV' =>11, 'DEC' =>12
|
||||||
}
|
}
|
||||||
|
@ -587,13 +578,11 @@ class Time
|
||||||
alias rfc822 rfc2822
|
alias rfc822 rfc2822
|
||||||
|
|
||||||
|
|
||||||
# An array of day names, as defined by RFC 2822
|
RFC2822_DAY_NAME = [ # :nodoc:
|
||||||
RFC2822_DAY_NAME = [
|
|
||||||
'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
|
'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
|
||||||
]
|
]
|
||||||
|
|
||||||
# An array of month names, as defined by RFC 2822
|
RFC2822_MONTH_NAME = [ # :nodoc:
|
||||||
RFC2822_MONTH_NAME = [
|
|
||||||
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue