help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Procedures and functions] Reference for unit 'dateutils' (#rtl)

PreviousDayOfWeek

Given a day of the week, return the previous day of the week.

Declaration

Source position: dateutil.inc line 113

function PreviousDayOfWeek(

  DayOfWeek: Word

):Word;

Arguments

DayOfWeek

  

Day of the week.

Function result

The day of the week prior to DayOfWeek

Description

PreviousDayOfWeek returns the previous day of the week. If the current day is the first day of the week (1) then the last day will be returned (7).

Remark: Note that the days of the week are in ISO notation, i.e. 1-based.

See also

Yesterday

  

Return the previous day.

Example

Program Example22;

{ This program demonstrates the PreviousDayOfWeek function }

Uses SysUtils,DateUtils;

Var
  D : Word;

Begin
  For D:=1 to 7 do
    Writeln('Previous day of ',D,' is : ',PreviousDayOfWeek(D));
End.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505