EndOfTheYear function
Calculate a TDateTime value representing the last day of a year, given a date in that year.
Declaration
function EndOfTheYear(const AValue: TDateTime): TDateTimeArguments
AValue | Date in the year of which the end should be calculated. |
Function result
TDateTime value representing the end of the year in which
AValue falls.
Description
EndOfTheYear extracts the year part of
AValue and
returns a
TDateTime value with the date of the last day of that year (December 31), as the
EndOfAYear function.See also
Example: ex25
Program Example25;
{ This program demonstrates the EndOfTheYear function }
Uses SysUtils,DateUtils;
Const
Fmt = '"Last day of this year : "dd mmmm yyyy';
Begin
Writeln(FormatDateTime(Fmt,EndOfTheYear(Today)));
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
