unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,DateUtils;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Button1: TButton;
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
      dt:TDate;
      czas: TDateTime;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
 Label1.Caption:=DateToStr(dt);
   dt:=IncMonth(dt);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
   Label2.Caption:=TimeToStr(czas); // przekroczenie 59 sek powoduje dodanie minuty
   czas:=IncSecond(czas);           // moduł DateUtils
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
   czas:=Time;
   dt:=Date;
end;

end.
