Sign in Join
FPDoc Onlineexperiment

DaysInAYear function

In unit DateUtils

Number of days in a particular year.

Declaration

pascal
function DaysInAYear(const AYear: Word): Word

Arguments

AYear

Year for the number of days in the return value.

Function result

Number of days in year AYear.

Description

DaysInAYear returns the number of weeks in the year AYear. The return value is either 365 or 366.

See also

Example: ex15

pascal
Program Example15;

{ This program demonstrates the DaysInAYear function }

Uses SysUtils,DateUtils;

Var
  Y : Word;

Begin
  For Y:=1992 to 2010 do
    Writeln(Y,' has ',DaysInAYear(Y),' days.');
End.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.