[#76442] [Ruby trunk Feature#11741] Migrate Ruby to Git from Subversion — naruse@...
Issue #11741 has been updated by Yui NARUSE.
3 messages
2016/07/19
[#76515] [Ruby trunk Bug#12610] webrick: protect from httpoxy — nagachika00@...
Issue #12610 has been updated by Tomoyuki Chikanaga.
3 messages
2016/07/22
[ruby-core:76422] [Ruby trunk Bug#12297] Ruby stdlib date can parse non-existent date with year 0
From:
matz@...
Date:
2016-07-19 07:37:26 UTC
List:
ruby-core #76422
Issue #12297 has been updated by Yukihiro Matsumoto.
According to [ruby-dev:10241] (Japanese), it's intentional.
In Gregorian calendar, the year 0 does not exist, but in astronomical year numbering, the year 0 does exist.
https://en.wikipedia.org/wiki/0_(year)
Matz.
----------------------------------------
Bug #12297: Ruby stdlib date can parse non-existent date with year 0
https://bugs.ruby-lang.org/issues/12297#change-59663
* 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')
=> #<Date: 0000-01-07 ((1721064j,0s,0n),+0s,2299161j)>
[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.
---Files--------------------------------
no_year_0.patch (1.62 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>