IsLeapYear

Navigation:  Appendices > Macro Language > Built-in Functions > All Functions (Alphabetical) >

IsLeapYear

Previous pageReturn to chapter overviewNext page

bool = IsLeapYear(nYear)

 

This macro function returns true if nYear corresponds to a leap year (ie. a year which includes a February 29, hence has 366 days) and false otherwise.

 

Recall the rules for leap years :

 

Years that are divisible by 4 are leap years (1980, 1984, 1988,…).

 

If they are divisible by 100, then they are not leap years (1800, 1900).

 

But if they are divisible by 400, then they are leap years (1600,2000).

 

Most people know the first 2 rules but are unaware of the last rule, causing them to think that 2000 was not supposed to be a leap year.


Topic 105074 updated on 01-Apr-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?isleapyear.htm