Re: Error with the leap year

[email protected] (Matthew Hall)
Newsgroups perl.datetime
Message-ID <[email protected]>
On Fri, Mar 02, 2012 at 10:17:08AM +0000, Zefram wrote:
> In the awkward case, it advances to March 1st:

...

> Of course, it has the downside that year addition isn't associative:
> advancing from a February 29th by four years gives a different result
> from advancing by one year four times.

...

> It's nicer, in that day addition *is* associative.  Of course, a quarter
> of the time (when the 365 days spans a leap day), the 365-days-later
> won't be the same-date-next-year.  Is that what you mean by the "leap
> year problem"?

Reasons Why You Should Never Write Custom Date / Time Handling Code Yourself 
Vol. 1 No. 1 - 3...

Matthew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.