07-24-2008 08:33 AM
07-25-2008 07:55 AM
07-25-2008 04:35 PM
07-27-2008 05:16 AM
07-28-2008 01:00 AM
07-28-2008 05:21 AM
10-15-2008 07:24 AM
08-04-2011 11:52 AM
Leapyears are every four years EXCEPT for century years which are only leapyears if they are divisible by 400. So, 2012 is a leap year (divisible by 4), 1900 was not a leapyear (it was a century year but was not divisible by 400), 2000 was a leapyear (century year divisible by 400).
08-05-2011 12:04 PM
Although --- this is a bit off topic by now, since I'm fairly certain that darrylovia's answer means that treating the days before 1582 as if they came from current-day calendar practices is essentially wrong ... I thought I'd share my leap year code logic (operates on the year in four digits ... so you'd need to get the year from the SAS date value first):
/* The following is the beginning snippet of code that defines a year as a leap year */
IF (MOD(YEAR,100) NE 0 AND MOD(YEAR,4) EQ 0) OR (MOD(YEAR,400) EQ 0) THEN
... I think this handles when leap years occur in the modern calendar.