DaysInYear function
Return the number of days in the year in which a date occurs.
Declaration
function DaysInYear(const AValue: TDateTime): WordArguments
AValue | Date in year of which to calculate the number of days. |
Function result
Number of days in the year in which
AValue occurs.
Description
daysInYear returns the number of days in the year part of
AValue. The return value is either 365 or 366.
See also
Example: ex14
Program Example14;
{ This program demonstrates the DaysInYear function }
Uses SysUtils,DateUtils;
Var
Y : Word;
Begin
For Y:=1992 to 2010 do
Writeln(Y,' has ',DaysInYear(EncodeDate(Y,1,1)),' days.');
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
