Full name of day(month) by number

Posted in DateTime

Use LongMonthNames and LongDayNames functions for getting full name of day or month for a specified number. 1 is January ... 12 is December 1 is Sunday ... 7 is Saturday.

procedure TForm1.Button1Click(Sender: TObject);
var
  i: Integer;
begin
  for i:=1 to 12 do
    Memo1.Lines.Add(LongMonthNames[i]);
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  i: Integer;
begin
  for i:=1 to 7 do
    Memo2.Lines.Add(LongDayNames[i]);
end;