IsLeapYear function
Determine whether a year is a leap year.
Declaration
function IsLeapYear(Year: Word): BooleanDescription
IsLeapYear returns
True if
Year is a leap year,
False otherwise.Errors
None.
See also
Example: ex16
Program Example16;
{ This program demonstrates the IsLeapYear function }
Uses sysutils;
Var YY,MM,dd : Word;
Procedure TestYear (Y : Word);
begin
Writeln (Y,' is leap year : ',IsLeapYear(Y));
end;
Begin
DeCodeDate(Date,YY,mm,dd);
TestYear(yy);
TestYear(2000);
TestYear(1900);
TestYear(1600);
TestYear(1992);
TestYear(1995);
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
