ISLEAP()
Tests if a specific year is a leap year
Syntax
ISLEAP([<dDate>]) --> lLeapYear
Argument
<dDate> Designates whether or not the specified date is in a leap year. The default is the system date.
Returns
ISLEAP() returns .T. when <dDate> lies in a leap year; otherwise, it returns .F..
Description
A number of technical financial calculations need to know if a year has 365 or 366 days. ISLEAP() determines this.
Note
. When parameters are missing, the function automatically uses the system date. You must adhere to all rules for leap year tests. In the rare occurrence of a century change, the function also returns a correct result.
Examples
? Date(), IsLeap() ? AddMonth( 12 ), IsLeap(AddMonth( 12)) ? AddMonth( -12 ), IsLeap(AddMonth( -12))
Compliance
ISLEAP() is compatible with CT3’s ISLEAP().
Platforms
All
Files
Source is dattime2.prg, library is libct.
Pingback: Harbour Check Functions | Viva Clipper !
Pingback: Harbour All Functions – I | Viva Clipper !
Pingback: Harbour Date & Time Functions | Viva Clipper !