StartOfTheMonth function
Calculate the first day of the month, given a date in that month.
Declaration
function StartOfTheMonth(const AValue: TDateTime): TDateTimeArguments
AValue | Date to return first of month from. |
Function result
First day of month as a
TDateTime value.
Description
StartOfTheMonth extracts the year and month parts of
AValue and
returns a
TDateTime value with the date of the first day of that year
and month as the
StartOfAMonth function.See also
Example: ex28
Program Example28;
{ This program demonstrates the StartOfTheMonth function }
Uses SysUtils,DateUtils;
Const
Fmt = '"First day of this month : "dd mmmm yyyy';
Begin
Writeln(FormatDateTime(Fmt,StartOfTheMonth(Today)));
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
