[LEAPSECS] Lets get REAL about time.
Clive D.W. Feather
clive at davros.org
Fri Jan 27 08:58:27 EST 2012
Stephen Colebourne said:
>> Oh? When is a month from Monday coming? What day is 4 months after the last
>> day of next month? What about the antepenultimate day of next month?
>> Explain your working in each case.
> Each of those three examples requires the day-of-week,
The first does, but only because I didn't phrase it as "When is a month
from 30th January?", which is what I meant.
> The point of storing data in this form is that most queries of a date
> are for year, month and day-of-month. Similarly, most sets/adds, like
> 2012-01-31 + 1month require the year, month and day-of-month. In the
> format above, those calculations are easy.
Okay, all of those three (as amended in the first case) are of that form:
2012-01-30 + 1 month
2012-02-29 + 4 months
2012-02-27 + 4 months
and let me add:
2011-02-28 + 1 year
Clive D.W. Feather | If you lie to the compiler,
Email: clive at davros.org | it will get its revenge.
Web: http://www.davros.org | - Henry Spencer
Mobile: +44 7973 377646
More information about the LEAPSECS