ISLEAP()

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.

3 responses to “ISLEAP()

  1. Pingback: Harbour Check Functions | Viva Clipper !

  2. Pingback: Harbour All Functions – I | Viva Clipper !

  3. Pingback: Harbour Date & Time Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.