From: "tadf (tadayoshi funaba)" Date: 2013-09-25T06:27:34+09:00 Subject: [ruby-core:57357] [ruby-trunk - Bug #8941][Rejected] strptime %Y parsing Issue #8941 has been updated by tadf (tadayoshi funaba). Category changed from lib to Joke Status changed from Assigned to Rejected Priority changed from Normal to Low we don't need any bug reports for python. ruby's one isn't wrong. ---------------------------------------- Bug #8941: strptime %Y parsing https://bugs.ruby-lang.org/issues/8941#change-41960 Author: exoth (Yury Trofimenko) Status: Rejected Priority: Low Assignee: tadf (tadayoshi funaba) Category: Joke Target version: ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN Time.strptime("1", "%Y") => 0001-01-01 00:00:00 +0642 Is it expected behavior? strftime docs say this: # %Y - Year with century (can be negative, 4 digits at least) # -0001, 0000, 1995, 2009, 14292, etc. So I would expect it to parse only 4 digits as well, as when some parsed data changes format from 2013 to 13 I would better get an error, but I just get 0013 year. By the way, Python's strptime seems to accept only 4 digit years. -- http://bugs.ruby-lang.org/