help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

IsLeapYear

Determine whether a year is a leap year.

Declaration

Source position: datih.inc line 116

function IsLeapYear(

  Year: Word

):Boolean;

Description

IsLeapYear returns True if Year is a leap year, False otherwise.

Errors

None.

See also

IncMonth

  

Increases the month in a TDateTime value with a given amount.

Date

  

Return the current date.

Example

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505