home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / dosex / ex2.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  496 b   |  17 lines

  1. Program Example2;
  2. uses Dos;
  3.  
  4. { Program to demonstrate the GetDate function. }
  5.  
  6. const
  7.   DayStr:array[0..6] of string[3]=('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
  8.   MonthStr:array[1..12] of string[3]=('Jan','Feb','Mar','Apr','May','Jun',
  9.                                       'Jul','Aug','Sep','Oct','Nov','Dec');
  10. var
  11.   Year,Month,Day,WDay : word;                      
  12. begin
  13.   GetDate(Year,Month,Day,WDay);
  14.   WriteLn('Current date');
  15.   WriteLn(DayStr[WDay],', ',Day,' ',MonthStr[Month],' ',Year,'.');
  16. end.
  17.