Simple Expired Delphi Scrypt by Date

Hello comeback again to code, the last small aplication was need expired function so today i'll show
you how to add simple script get exired program. this the code:

procedure TForm1.FormShow(Sender: TObject); //add it on fromshow
var
myDate : TDateTime;
TheYear, TheMonth, TheDay, ThexYear, ThexMonth, ThexDay : Integer;
begin
{ expired until }
TheYear := 2017;
TheMonth := 2;
TheDay := 10;
{ dont use before }
ThexYear := 2017;
ThexMonth := 2;
ThexDay := 5;

if (Date >= EncodeDate(TheYear, TheMonth, TheDay)) then
begin
// message or command
end
else if (Date <= EncodeDate(ThexYear, ThexMonth, ThexDay)) then
begin
// message or command
Close;
end

end;