home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
vp21beta.zip
/
LEXMPSRC.RAR
/
TIME.PAS
< prev
Wrap
Pascal/Delphi Source File
|
2000-08-15
|
1KB
|
36 lines
{█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█}
{█ █}
{█ Virtual Pascal for Linux █}
{█ Test example for date / time functions █}
{█ ─────────────────────────────────────────────────█}
{█ Copyright (C) 1999 Joerg Pleumann █}
{█ █}
{▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀}
program Time;
uses
Dos;
var
Year, Month, Day, DayOfWeek, Hour, Minute, Second, Sec100: LongInt;
begin
GetDate(Year, Month, Day, DayOfWeek);
GetTime(Hour, Minute, Second, Sec100);
Write('Date is: ', Year:4, '/', Month:2, '/', Day:2, ', ');
case DayOfWeek of
0: WriteLn('Sunday');
1: WriteLn('Monday');
2: WriteLn('Tuesday');
3: WriteLn('Wednesday');
4: WriteLn('Thursday');
5: WriteLn('Friday');
6: WriteLn('Saturday');
end;
WriteLn('Time is: ', Hour: 2, ':', Minute:2, ':', Second, '.', Sec100 * 10);
end.