mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* time.c: [DOC] Clarify %Y in strftime, which can accept any digits
and will output at least 4 digits as the year. Reported by Yury Trofimenko [Bug #8941] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1bf4a34eec
commit
ea418dda41
3 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Mon Jul 28 05:55:56 2014 Zachary Scott <e@zzak.io>
|
||||||
|
|
||||||
|
* time.c: [DOC] Clarify %Y in strftime, which can accept any digits
|
||||||
|
and will output at least 4 digits as the year. Reported by Yury
|
||||||
|
Trofimenko [Bug #8941]
|
||||||
|
|
||||||
|
* lib/time.rb: ditto
|
||||||
|
|
||||||
Mon Jul 28 05:32:06 2014 Zachary Scott <e@zzak.io>
|
Mon Jul 28 05:32:06 2014 Zachary Scott <e@zzak.io>
|
||||||
|
|
||||||
* lib/uri/common.rb: [DOC] [Bug #10075] Clarify how URI.join arguments
|
* lib/uri/common.rb: [DOC] [Bug #10075] Clarify how URI.join arguments
|
||||||
|
|
|
@ -417,7 +417,7 @@ class Time
|
||||||
# %x :: Preferred representation for the date alone, no time
|
# %x :: Preferred representation for the date alone, no time
|
||||||
# %X :: Preferred representation for the time alone, no date
|
# %X :: Preferred representation for the time alone, no date
|
||||||
# %y :: Year without a century (00..99)
|
# %y :: Year without a century (00..99)
|
||||||
# %Y :: Year with century
|
# %Y :: Year which may include century, if provided
|
||||||
# %z :: Time zone as hour offset from UTC (e.g. +0900)
|
# %z :: Time zone as hour offset from UTC (e.g. +0900)
|
||||||
# %Z :: Time zone name
|
# %Z :: Time zone name
|
||||||
# %% :: Literal "%" character
|
# %% :: Literal "%" character
|
||||||
|
|
2
time.c
2
time.c
|
@ -4399,7 +4399,7 @@ strftimev(const char *fmt, VALUE time, rb_encoding *enc)
|
||||||
* Format directives:
|
* Format directives:
|
||||||
*
|
*
|
||||||
* Date (Year, Month, Day):
|
* Date (Year, Month, Day):
|
||||||
* %Y - Year with century (can be negative, 4 digits at least)
|
* %Y - Year with century if provided, will pad result at least 4 digits.
|
||||||
* -0001, 0000, 1995, 2009, 14292, etc.
|
* -0001, 0000, 1995, 2009, 14292, etc.
|
||||||
* %C - year / 100 (rounded down such as 20 in 2009)
|
* %C - year / 100 (rounded down such as 20 in 2009)
|
||||||
* %y - year % 100 (00..99)
|
* %y - year % 100 (00..99)
|
||||||
|
|
Loading…
Add table
Reference in a new issue