Text preview for : TimeDefs.mesa_Mar78.pdf part of xerox TimeDefs.mesa Mar78 xerox mesa 3.0_1977 listing TimeDefs.mesa_Mar78.pdf
Back to : TimeDefs.mesa_Mar78.pdf | Home
TimeDefs.mesa 30-MAR-78 14:47:33 Page 1
-- file: TimeDefs.Mesa
-- last edited by Johnsson. January 3. 1978 8:15 AM
DIRECTORY
InlineDefs: FROM "inlinedefs";
TimeDefs: DEFINITIONS
BEGIN
StartWeekDay: PRIVATE INTEGER = 1; -- Jan. 1. 1901 was a Tuesday
BaseYear: PRIVATE INTEGER = 1901;
DaysInFourYears: PRIVATE INTEGER 4*365+1;
WestEast: TYPE = {west. east};
LocalTimeParameters: TYPE = MACHINE DEPENDENT RECORD [
direction: WestEast. Pacific is west
zone: [0 .. 12]. Pacific = 8
unusedl: [0 .. 3B].
beginDST: [0 .. 366]. 121 April 30
unused2: [O .. lB].
zoneminutes: [0 .. 59].
endDST: [0 .. 366]]; 305 = October 31
currentParameters: POINTER TO LocalTimeParameters = LOOPHOLE[570B];
HardwareTime: TYPE = PRIVATE MACHINE DEPENDENT RECORD [
high. low: CARDINAL]; -- note: high and low reversed from LongCARDINAL
currentTime: POINTER TO HardwareTime = LOOPHOLE[572B];
PackedTime: TYPE = InlineDefs.LongCARDINAL;
-- DefaultTime: PackedTime = [0.0];
UnpackedTime: TYPE RECORD [
year: [0 .. 2050]. base year is 1901
month: [0 .. 12). January = 0
day: [0 .. 31]. first day of month 1
hour: [0 .. 24).
minute: [0 .. 60).
second: [0 .. 60).
weekday: [0 .. 6]. -- Monday 0
zone: [-12 .. 12].
dst: BOOLEAN];
CurrentDayTime: PROCEDURE RETURNS [PackedTime];
UnpackDT: PROCEDURE [PackedTime] RETURNS [UnpackedTime];
InvalidTime: ERROR;
PackDT: PROCEDURE [unp: UnpackedTime. computeDST: BOOLEAN] RETURNS [PackedTime];
AppendDayTime: PROCEDURE [STRING. UnpackedTime]; -- 12-JAN-77 12:34
AppendFullDayTime: PROCEDURE [STRING. UnpackedTime]: -- 12-JAN-77 12:34 PST
END ...