Fraser Goffin wrote:
> (snipped)
> Here endDate is shown as the 27th Feb. One might expect this to be the
> 28th, but it all depends on whether adding 1 year to the 29th Feb
> should be 28th Feb in the following year or 01 March. The
> implementation takes the position that it should be 28th Feb and
> therefore, subtracting 1 day yields 27th.
>
> This seems reasonable.
>
> BUT, if I use a startDate of 2004-2-28 I will also get the same
> result. H'mm now I'm not so sure, maybe adding 1 year to 29th February
> SHOULD be 01 March after all ??
>
> Comments
I think M Kay comments are spot on here.
there are many non-intuitive results with date arithmetic
i tend to start here for any discussion with ISO 8601
http://www.cl.cam.ac.uk/~mgk25/iso-time.html
gl, Jim Fuller
|