The rleapyear() function

The rleapyear() function returns 1 (TRUE) when the argument that is passed to it is a leap year and 0 (FALSE) when it is not.

Syntax

mint rleapyear(year)
   mint year;
year
An integer.

Usage

The argument year must be the year component of a date and not the date itself. You must express the year in full form (2006) and not abbreviated form (06).

Return values

1
The year is a leap year.
0
The year is not a leap year.