Sign in Join
FPDoc Onlineexperiment

IsInLeapYear function

In unit DateUtils

Determine whether a date is in a leap year.

Declaration

pascal
function IsInLeapYear(const AValue: TDateTime): Boolean

Arguments

AValue

Date to be checked.

Function result

True if AValue is in a leap year, False if not.

Description

IsInLeapYear returns True if the year part of AValue is leap year, or False if not.

See also

Example: ex3

pascal
Program Example3;

{ This program demonstrates the IsInLeapYear function }

Uses SysUtils,DateUtils;

Begin
  Writeln('Current year is leap year: ',IsInLeapYear(Date));
End.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.