|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Date, seg_041d6f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Text_Io; with Time_Utilities; use Time_Utilities; package body Date is procedure Init_With_System_Date (The_Date : out Object) is Date_Systeme : Time; Heure : Date.Heure; Jour : Date.Jour; begin Date_Systeme := Get_Time; Jour := Date.Jour (Day_Of_Week (Date_Systeme)); Heure := Date.Heure (Date_Systeme.Hour); if (Date_Systeme.Sun_Position = Pm) then Heure := (Heure mod 12) + 12; end if; Date.Set_Date (The_Date => The_Date, At_Day => Jour, At_Hour => Heure, At_Minute => Date.Minute (Date_Systeme.Minute)); end Init_With_System_Date; procedure Set_Date (The_Date : out Object; At_Day : Jour; At_Hour : Heure; At_Minute : Minute) is begin Set_Day (The_Date => The_Date, Day_To_Set => At_Day); Set_Hour (The_Date => The_Date, Hour_To_Set => At_Hour); Set_Minutes (The_Date => The_Date, Minutes_To_Set => At_Minute); end Set_Date; procedure Set_Day (The_Date : out Object; Day_To_Set : in Jour) is begin The_Date.Day := Day_To_Set; end Set_Day; function Get_Day (The_Date : in Object) return Jour is begin return The_Date.Day; end Get_Day; procedure Set_Hour (The_Date : out Object; Hour_To_Set : in Heure) is begin The_Date.Hour := Hour_To_Set; end Set_Hour; function Get_Hour (The_Date : in Object) return Heure is begin return The_Date.Hour; end Get_Hour; procedure Set_Minutes (The_Date : out Object; Minutes_To_Set : in Minute) is begin The_Date.Minutes := Minutes_To_Set; end Set_Minutes; function Get_Minutes (The_Date : in Object) return Minute is begin return The_Date.Minutes; end Get_Minutes; function Is_Equal (Date1 : in Object; Date2 : in Object) return Boolean is begin if Date1.Day /= Date2.Day then return False; end if; if Date1.Hour /= Date2.Hour then return False; end if; if Date1.Minutes /= Date2.Minutes then return False; end if; return True; end Is_Equal; procedure Print (The_Date : in Object) is begin Text_Io.Put_Line ("Date : " & Nom_De_Jour'Image (Nom_De_Jour'Val (The_Date.Day - 1)) & My_Types.Byte'Image (The_Date.Hour) & " heure(s), " & My_Types.Byte'Image (The_Date.Minutes) & " minutes"); end Print; end Date;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=19 rec1=00 rec2=01 rec3=01c [0x01] rec0=21 rec1=00 rec2=04 rec3=012 [0x02] rec0=23 rec1=00 rec2=02 rec3=00e [0x03] rec0=02 rec1=00 rec2=03 rec3=000 tail 0x2174292ea862857582a5c 0x42a00088462060003