ex2.pp 496 B

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