4 ms·
With ISO 8601 [1] there is already a standardized way of representing dates, times and intervals. This suggestion has at least one major design flaw - you can
by danbruc 14y ago
With ISO 8601 [1] there is already a standardized way of representing dates, times and intervals.
This suggestion has at least one major design flaw - you can not represent many common recurrences using seconds. Not every day has 86,400 seconds, not every month has 30 days, not every year has 365 days.
[1] http://en.wikipedia.org/wiki/ISO_8601 http://en.wikipedia.org/wiki/ISO_8601
- jonhmchan 14y agoI'm certainly aware of ISO 8601 - in fact, what I'm proposing is a more developer-friendly version of it that is conducive to (what should be) standard manipulations on points, intervals, recurrences, and series of recurrences of time. When it comes to representing time in seconds, in a development setting, the method is surprisingly rigorous. It certainly can't account for certain kinds of recurrence: i.e. the first Monday of each month, account for leap years, etc. However, for most use cases, it's sufficient.
- danbruc 14y agoUsing seconds is or at least seems convenient for developers but you can not represent many meaningful recurrences. Birthdays? No, because of leap years. A meeting every Monday at the same time? No, because of daylight saving time. Essentially everything beyond »every hour« is broken because one hour is the largest time unit with a fixed length - day, week, month and year do not share this property but are the units most recurrences are based on.