Unit Unit1;
Interface
Uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,DateUtils;
Type
TForm1 = class(TForm)
Procedure FormCreate(Sender: TObject);
Private
{ Private declarations }
Public
{ Public declarations }
End;
Var
Form1: TForm1;
Implementation
{$R *.dfm}
Procedure TForm1.FormCreate(Sender: TObject);
Var
dag: Array[1..7] of String;
Begin
dag[1] := 'måndag';
dag[2] := 'tisdag';
dag[3] := 'onsdag';
dag[4] := 'torsdag';
dag[5] := 'fredag';
dag[6] := 'lördag';
dag[7] := 'söndag';
ShowMessage(dateToStr(now) + ' är en ' + dag[DayOfTheWeek(now)]);
End;
End.