DayOfWeek function
Returns the day of the week.
Declaration
function DayOfWeek(DateTime: TDateTime): IntegerDescription
DayOfWeek returns the day of the week from
DateTime.
Sunday is counted as day 1,
Saturday is counted as
day 7. The result of
DayOfWeek can serve as an index to
the
LongDayNames constant array, to retrieve the name of
the day.Errors
None.
See also
Example: ex8
Program Example8;
{ This program demonstrates the DayOfWeek function }
Uses sysutils;
Begin
Writeln ('Today''s day is ',LongDayNames[DayOfWeek(Date)]);
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
