Sign in Join
FPDoc Onlineexperiment

EndOfAYear function

In unit DateUtils

Calculate a TDateTime value representing the last day of a year.

Declaration

pascal
function EndOfAYear(const AYear: Word): TDateTime

Arguments

AYear

Year to calculate last day from.

Function result

TDateTime representing the last day of AYear.

Description

StartOfAYear returns a TDateTime value with the date of the last day of the year AYear (December 31).

See also

Example: ex27

pascal
Program Example27;

{ This program demonstrates the EndOfAYear function }

Uses SysUtils,DateUtils;

Const
  Fmt = '"Last day of this year : "dd mmmm yyyy';

Begin
  Writeln(FormatDateTime(Fmt,EndOfAYear(YearOf(Today))));
End.

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