Calendar Functions (simpler leap year calculation)

Ron Natalie <ron> ron at brl-sem.ARPA
Wed Sep 17 12:02:05 AEST 1986


In article <886 at ihdev.UUCP>, pdg at ihdev.UUCP (P. D. Guthrie) writes:
> to return the number of days in a year......
> 
> #define num_day(x) ((x)%4 ? (x)%100 ? (x)%400 ? 366 : 355 : 356 : 355)

Say what?  My calendar never has 355 or 356 days a year.  



More information about the Comp.lang.c mailing list