Skip to content
Prev 248938 / 398506 Next

leap year and order function

Dear All,

I've always used this code:

year=c(1948:1953,2000,2100,2200,2300)
numdays=ifelse((year%%4==0 & year%%100!=0) | year%%400==0,366,365)
[1] 366 365 365 365 366 365 366 365 365 365

Toby