PROGRAM   GetDate_ ;
USES   DOS ;

CONST
   C_DayNames : Array[0..6] of String[9] = (
      'Sunday' , 'Monday' , 'Tuesday' ,
      'Wednesday' , 'Thursday' , 'Friday' , 'Saturday' );

   C_MonthNames : Array[1..12] of String[9] = (
      'January' , 'February' , 'March' , 'April' , 'May' , 'June' ,
      'July' , 'August' , 'September' , 'October' , 'November' , 'December' );
VAR
   G_Year      : Word ;
   G_Month     : Word ;                { 1..12 }
   G_Day       : Word ;                { 1..31 }
   G_DayOfWeek : Word ;                { 0..6 }
BEGIN
   GetDate ( G_Year , G_Month , G_Day , G_DayOfWeek );

   WriteLn ;
   WriteLn ( 'Date : ' );

   WriteLn ( 'Year  = ' , G_Year  );

   Write   ( 'Month = ' , G_Month );
   WriteLn ( '   (' , C_MonthNames[G_Month] , ')' );

   WriteLn ( 'Day   = ' , G_Day   );

   Write   ( 'DayOfWeek = ' , G_DayOfWeek );
   WriteLn ( '   (' , C_DayNames[G_DayOfWeek] , ')' );
END.
