Closed deepfryed closed 14 years ago
Definitely a bug that will be fixed, though fixing it will mean that you can't parse a date with a year after 9999 using strptime.
Fix strptime for %Y%m%d and similar formats (Closed by 44ef76e2deb083605215075cbd6d01e404b4dbe9)
Previously, strptime grabbed an arbitrary number of digits for the %Y and %G formats. Now it operates like the standard library, checking to see if %Y or %G is followed by a numeric literal or format, and restricting the number of digits to 4 if so.
cheers
DateTime.strptime("20100304", "%Y%m%d") should parse but getting `strptime': invalid date (ArgumentError)
using 0.9.0, on ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]