<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Calendar/

leapyr.pro

determine whether the input year is a leap year or not Very useful for finding number of days in a year. eg. NUM_DAYS_IN_YR = 365 + leapyr(year)

topleapyr calendar

result = leapyr(year)

Return value

0 then not a leap year 1 then year is a leap year

Parameters

year        in required

year to be tested as a leap year

Examples

IDL> result = leapyr(2000)

Version history

History

Originally Written by: Trevor Harris, Physics Dept., University of Adelaide, 20/09/88 November 2004: correction for century years... S. Masson; Every year divisible by 4 is a leap year. But every year divisible by 100 is NOT a leap year Unless the year is also divisible by 400, then it is still a leap year. This means that year 1800, 1900, 2100, 2200, 2300 and 2500 are NOT leap years, while year 2000 and 2400 are leap years. + supress the automatic change 89 -> 1989 June 2005 update for new commons, Sebastien Masson.

Other attributes

Uses routines

cm_4cal
Produced by IDLdoc 2.0.