4 ms·
Was it just me or was the wording in the article slightly confusing? The second paragraph changes from talking about the standard to talking about the ruby impl
by jeffdavis 14y ago
Was it just me or was the wording in the article slightly confusing? The second paragraph changes from talking about the standard to talking about the ruby implementation with out saying so in either case and no transition.
If I understand correctly, the complaint is that: ISO 8601 defines ####-## to be a year and month only, and it should have the granularity of a month; but Ruby treats it as an ordinal date.
It seems like it could be said much more clearly with an example:
irb(main):011:0> Date.iso8601("2012-12")
=> #<Date: 2012-01-12 ((2455939j,0s,0n),+0s,2299161j)>
It's treating ####-## as an ordinal date, when the standard says that it's a month-granularity date.