IMPLEMENTATION MODULE TimeAndDate;
(*
        Title:          Time and Date routines.
        Author:         D.R.Lamkin.
*)


(*
   These routine support two different string formats for the time:
      Textual:   "16 May 84 20:54:19"
      Standard:  "1985-02-17 09:57:15.21"
*)



PROCEDURE BinaryTime (VAR ts : TimeStamp) : INTEGER;

(*
   Return the binary time in the supplied timestamp record
*)
BEGIN

END BinaryTime;

PROCEDURE SetBinaryTime (ts : TimeStamp) : INTEGER;

(*
   Set the system time from the timestamp
*)
BEGIN

END SetBinaryTime ;



PROCEDURE BinaryTimeOfStandardTime (VAR ts : TimeStamp;
                                    stime : ARRAY OF CHAR ) : INTEGER;

(*
   Convert the given standard time into a timestamp.
*)
BEGIN

END BinaryTimeOfStandardTime;



PROCEDURE BinaryTimeOfTextualTime (VAR ts : TimeStamp;
                                   ttime : ARRAY OF CHAR ) : INTEGER;

(*
   Convert the given textual time into a timestamp.
*)
BEGIN

END BinaryTimeOfTextualTime;


PROCEDURE StandardTimeOfBinaryTime (VAR stime       : ARRAY OF CHAR;
                                    VAR stimelength : CARDINAL;
                                    ts              : TimeStamp) : INTEGER;

(*
   Convert the given timestamp into a standard time string
*)
BEGIN

END StandardTimeOfBinaryTime;



PROCEDURE TextualTimeOfBinaryTime (VAR stime       : ARRAY OF CHAR;
                                   VAR stimelength : CARDINAL;
                                   ts              : TimeStamp) : INTEGER;

(*
   Convert the given timestamp into a textual time string
*)
BEGIN

END TextualTimeOfBinaryTime;



PROCEDURE Time (VAR thetime : ARRAY OF CHAR;
                VAR length  : CARDINAL) : INTEGER;

(*
   Return the time portion of the textual format of the current time
*)

BEGIN

END Time ;


PROCEDURE StandardTime (VAR thetime : ARRAY OF CHAR;
                        VAR length  : CARDINAL) : INTEGER;

(*
   Return the current time in standard time format
*)

BEGIN

END StandardTime ;


PROCEDURE Date (VAR thedate : ARRAY OF CHAR;
                VAR length  : CARDINAL) : INTEGER;

(*
   Returns the date portion of current time in textual format
*)

BEGIN

END Date;


PROCEDURE TimeAndDate (VAR thetimeanddate : ARRAY OF CHAR;
                       VAR length         : CARDINAL) : INTEGER;

(*
   Returns current time and date in textual format
*)
BEGIN

END TimeAndDate;





(* ========================================================================= *)




PROCEDURE XBinaryTime (VAR ts : TimeStamp);
BEGIN

END XBinaryTime;


PROCEDURE XSetBinaryTime (ts : TimeStamp);
BEGIN

END XSetBinaryTime;


PROCEDURE XBinaryTimeOfStandardTime (VAR ts : TimeStamp;
                                    stime : ARRAY OF CHAR );
BEGIN

END XBinaryTimeOfStandardTime;

PROCEDURE XBinaryTimeOfTextualTime (VAR ts : TimeStamp;
                                   ttime : ARRAY OF CHAR );
BEGIN

END XBinaryTimeOfTextualTime;


PROCEDURE XStandardTimeOfBinaryTime (VAR stime       : ARRAY OF CHAR;
                                    ts              : TimeStamp) : CARDINAL;

BEGIN

END XStandardTimeOfBinaryTime;

PROCEDURE XTextualTimeOfBinaryTime (VAR stime       : ARRAY OF CHAR;
                                    ts              : TimeStamp) : CARDINAL;

BEGIN

END XTextualTimeOfBinaryTime;

PROCEDURE XTime (VAR thetime : ARRAY OF CHAR) : CARDINAL;
BEGIN

END XTime;


PROCEDURE XStandardTime (VAR thetime : ARRAY OF CHAR) : CARDINAL;
BEGIN

END XStandardTime;


PROCEDURE XDate (VAR thedate : ARRAY OF CHAR) : CARDINAL;
BEGIN

END XDate;


PROCEDURE XTimeAndDate (VAR thetimeanddate : ARRAY OF CHAR) : CARDINAL;
BEGIN

END XTimeAndDate;




END TimeAndDate.
