IsInLeapYear¶
Determine whether a date is in a leap year.
Declaration¶
Source position: dateutil.inc line 105
function IsInLeapYear(const AValue: TDateTime) : Boolean;
Arguments¶
| Name | Description |
|---|---|
| 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¶
| Name | Description |
|---|---|
| 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.