IsInLeapYear

Determine whether a date is in a leap year.

Declaration

Source position: dateutil.inc line 83

  function IsInLeapYear(const AValue: TDateTime) : Boolean;

Description

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

See also

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

Example

Program Example3;
{ This program demonstrates the IsInLeapYear function }
Uses SysUtils,DateUtils;
Begin
  Writeln('Current year is leap year: ',IsInLeapYear(Date));
End.