▲ | fsckboy 4 days ago | ||||||||||||||||||||||
>Consider "200". Is this the year 200? Is this the 200th day of the current year? Surprise, in ISO 8601 it’s neither — it’s a decade, spanning from the year 2000 to the year 2010. And "20" is the century from the year 2000 to the year 2100. there is so much wrong with this paragraph, it's a nest of people who shouldn't work on date parsing. there is no way 200 is any kind of date, but if you're going to insist it is, 2000 to 2010 is 11 years unless "to" means "up to but not including" in which case it should say 2001 to 2011 if you want to refer to the 200th decade, since decade 1 was 1AD through 10AD... there is no saving this post | |||||||||||||||||||||||
▲ | tobyhinloopen 4 days ago | parent | next [-] | ||||||||||||||||||||||
I agree, "200" is just "NotADate". I like JS-Joda's date formatting. | |||||||||||||||||||||||
▲ | eterm 4 days ago | parent | prev [-] | ||||||||||||||||||||||
> 2000 to 2010 is 11 years This is obviously wrong by induction. If 2000 to 2010 is 11 years, then: 2000 to 2009 would be length 10 years ... 2000 to 2001 would have length 2 years and finally 2000 to 2000 would be a span lasting "1 year". But any span with the same start and end point must have length zero, it's nonsensical to have a system without that property. As for the spec, ISO 8601 defines a decade as a period of 10 years starting with a year divisible by 10 without a remainder. Decade 1 is year(s) 10 through 19. | |||||||||||||||||||||||
|