DEFINITION Time;

  CONST

    MONTAG      = 1;
    DIENSTAG    = 2;
    MITTWOCH    = 3;
    DONNERSTAG  = 4;
    FREITAG     = 5;
    SONNABEND   = 6;
    SONNTAG     = 7;
    JANUAR      = 1;
    FEBRUAR     = 2;
    MAERZ       = 3;
    APRIL       = 4;
    MAI         = 5;
    JUNI        = 6;
    JULI        = 7;
    AUGUST      = 8;
    SEPTEMBER   = 9;
    OKTOBER     = 10;
    NOVEMBER    = 11;
    DEZEMBER    = 12;

  TYPE

    Time  = RECORD
              hour* : INTEGER;
              min*  : INTEGER;
              sec*  : INTEGER;
            END;
    Date  = RECORD
              day*   : INTEGER;
              month* : INTEGER;
              year*  : INTEGER;
            END;

  PROCEDURE GetCurrentTime(VAR time: Time);
  PROCEDURE GetCurrentDate(VAR date: Date);
  PROCEDURE TimeToStr(time: Time; VAR str: ARRAY OF CHAR);
  PROCEDURE DateToStr(date: Date; VAR str: ARRAY OF CHAR);
  PROCEDURE DayOfWeek(d: Date): INTEGER;
  PROCEDURE DaysBetween(d1: Date; d2: Date): LONGINT;
  PROCEDURE AddDays(VAR d: Date; n: LONGINT);
  PROCEDURE IsFeiertag(d: Date): BOOLEAN;
  PROCEDURE TimeIsValid(time: Time): BOOLEAN;
  PROCEDURE InvalidateTime(VAR time: Time);
  PROCEDURE DateIsValid(date: Date): BOOLEAN;
  PROCEDURE InvalidateDate(VAR date: Date);
  PROCEDURE StrToDate(str: ARRAY OF CHAR; VAR date: Date);
  PROCEDURE IsSameDate(date1: Date; date2: Date): BOOLEAN;

END Time.
