macintosh_cookbook/examples/time.pas
2020-05-07 18:47:11 +09:00

19 lines
320 B
ObjectPascal

program ExampleTime;
var
date: DateTimeRec;
seconds: Longint;
begin
ShowText;
GetTime(date);
GetDateTime(seconds);
Writeln('The current time is:');
Writeln(date.hour : 2, ':', date.minute : 2, ':', date.second : 2);
Writeln;
Writeln('Seconds since midnight, January 1, 1904:');
Writeln(-seconds);
end.