DEFINITION MODULE DateUtilities;

  FROM TimeDate IMPORT Time;
  EXPORT QUALIFIED DayOfWeek, DateDifference, SetDate;

  PROCEDURE DayOfWeek(date: Time): CARDINAL;
    (* returns 0 = Sunday, ... 6 = Saturday*)

  PROCEDURE DateDifference(First, Last: Time): CARDINAL;
    (* returns the numbers of days from first to last *)

  PROCEDURE SetDate(Year, Month, Day: CARDINAL; VAR Date: Time)
    (* set the date word if the timestamp *)
    (* 1900 < Year < 2100, 1 <= Month <= 12, 1 <= Day <= 31 *)

  END DateUtilities.
