apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: [patch] Time fixes for Win32
Date Thu, 01 Feb 2001 23:22:27 GMT

--- cmpilato@collab.net wrote:
> +/* Leap year is any year divisible by four, but not by 100 unless also
> + * divisible by 400
> + */
> +#define IsLeapYear(y) ((!(y % 4)) ? (((!(y % 400)) && (y % 100)) ? 1 : 0) :
0)
> +

If y is divisible evenly by 400, it's automatically divisible by 100... you don't need to
check both.  =-)

--Cliff

__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Mime
View raw message