From: 0.globi@... Date: 2016-04-18T12:54:03+00:00 Subject: [ruby-core:75007] [Ruby trunk Bug#12297] Ruby stdlib date can parse non-existent date with year 0 Issue #12297 has been reported by t b. ---------------------------------------- Bug #12297: Ruby stdlib date can parse non-existent date with year 0 https://bugs.ruby-lang.org/issues/12297 * Author: t b * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- Ruby date lib can parse date with year 0 `$ pry [1] pry(main)> shitdate=Date.strptime('0000-01-07','%Y-%m-%d') => # [2] pry(main)> shitdate.year => 0 [3] pry(main)> ` There is no year 0 in gregorian and julian calendar between 1 BC and 1 AD It should raise ArgumentError like it do when month/day number is 0. -- https://bugs.ruby-lang.org/ Unsubscribe: