6 ms·
ISO 8601 defines a number of lesser known features. For example, it allows for not only fractional seconds (12:34:56.78) but also fractional hours (12.3) and mi
by lifthrasiir 14y ago
ISO 8601 defines a number of lesser known features. For example, it allows for not only fractional seconds (12:34:56.78) but also fractional hours (12.3) and minutes (12:34.93). There is a special notation for the midnight of certain day (24:00:00 or 24:00), and obviously another for a positive leap second (08:59:60 etc.). There are three ways to write a date: 2012-05-21, 2012-W21-1 and 2012-142. Intervals can be specified in terms of start and end, start and duration, duration and end, just a duration (i.e. no context). There are also recurring intervals which can be bounded in the number of recurrences or not. And so on and on and on.
That said, ISO 8601 tries to cover most cases for date/time representation. Implementing every bit of ISO 8601 is not desirable of course, but it is certainly worth looking at.
- geon 14y ago> 2012-142 Does that represent the 142:nd day of the year? Isn't that ambiguous when you can specify a year and month in the same format?
- estel 14y agoThe format is YYYY-DDD with leading zeroes.
- geon 14y agoSo 2012-142 is not a valid date? Should it be 2012-0142?
- evilduck 14y agoI don't see the need for a placeholder for the n-thousandth day of the year. Unless we want to accomodate something like 2011-0367 also equating to 2012-0002?
- sanxiyn 14y ago2012-142 is valid. 2012-012 is valid. 2012-12 is not. For nth day specify exactly three digits. No confusion with months.