[Overview][Constants][Procedures and functions][Index] | Reference for unit 'DateUtils' (#rtl)

# IsInLeapYear

Determine whether a date is in a leap year.

## Declaration

Source position: dateutil.inc line 96

`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

YearOf |  | Extract the year from a given date.
IsPM |  | Determine whether a time is PM or AM.
IsToday |  | Check whether a given date is today.
IsSameDay |  | Check if two date/time indications are the same day.

## Example

    Program Example3;

    { This program demonstrates the IsInLeapYear function }

    Uses SysUtils,DateUtils;

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

Documentation generated on: May 14 2021