[ruby-cvs:78296] a9d4f2d03c (master): Support %U/%u/%W/%w/%V/%g/%G formats in Time.strptime
"Jeremy Evans" <[email protected]>
| Newsgroups | gmane.comp.lang.ruby.cvs |
|---|---|
| Message-ID | <[email protected]> |
Jeremy Evans 2019-06-22 02:33:06 +0900 (Sat, 22 Jun 2019)
New Revision: a9d4f2d03c
https://github.com/ruby/ruby/commit/a9d4f2d03c
Log:
Support %U/%u/%W/%w/%V/%g/%G formats in Time.strptime
Most of these formats were documented as supported, but were not
actually supported. Document that %g and %G are supported.
If %U/%W is specified without yday and mon/mday are not specified,
then Date.strptime is used to get the appropriate yday.
If cwyear is specifier without the year, or cwday and cweek are
specified without mday and mon, then use Date.strptime and convert
the resulting value to Time, since Time.make_time cannot handle
those conversions
Fixes [Bug #9836]
Fixes [Bug #14241]
Modified files:
lib/time.rb
test/test_time.rb