|
|
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: 9216 (0x2400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package Time_Utilities, seg_00ec27
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Calendar;
package Time_Utilities is
Minute : constant Duration := 60.0;
Hour : constant Duration := 3600.0;
Day : constant Duration := 86_400.0;
--------------------------------------------------------------------
-- Time_Utilities.Time is a segmented version of Calendar.Time
-- with image and value functions
--------------------------------------------------------------------
type Years is new Calendar.Year_Number;
type Months is (January, February, March, April, May, June, July,
August, September, October, November, December);
type Days is new Calendar.Day_Number;
type Hours is new Integer range 1 .. 12;
type Minutes is new Integer range 0 .. 59;
type Seconds is new Integer range 0 .. 59;
type Sun_Positions is (Am, Pm);
type Time is
record
Year : Years;
Month : Months;
Day : Days;
Hour : Hours;
Minute : Minutes;
Second : Seconds;
Sun_Position : Sun_Positions;
end record;
function Get_Time return Time;
function Convert_Time (Date : Calendar.Time) return Time;
function Convert_Time (Date : Time) return Calendar.Time;
function Nil return Time;
function Is_Nil (Date : Time) return Boolean;
function Nil return Calendar.Time;
function Is_Nil (Date : Calendar.Time) return Boolean;
type Time_Format is (Expanded, -- 11:00:00 PM
Military, -- 23:00:00
Short, -- 23:00
Ada -- 23_00_00
);
type Date_Format is (Expanded, -- September 29, 1983
Month_Day_Year, -- 09/29/83
Day_Month_Year, -- 29-SEP-83
Year_Month_Day, -- 83/09/29
Ada -- 83_09_29
);
type Image_Contents is (Both, Time_Only, Date_Only);
function Image (Date : Time;
Date_Style : Date_Format := Time_Utilities.Expanded;
Time_Style : Time_Format := Time_Utilities.Expanded;
Contents : Image_Contents := Time_Utilities.Both)
return String;
function Value (S : String) return Time;
-- Gives incorrect results for dates earlier than 1924.
--------------------------------------------------------------------
-- Time_Utilities.Interval is a segmented version of Duration
-- with image and value functions
--------------------------------------------------------------------
type Day_Count is new Integer range 0 .. Integer'Last;
type Military_Hours is new Integer range 0 .. 23;
type Milliseconds is new Integer range 0 .. 999;
type Interval is
record
Elapsed_Days : Day_Count;
Elapsed_Hours : Military_Hours;
Elapsed_Minutes : Minutes;
Elapsed_Seconds : Seconds;
Elapsed_Milliseconds : Milliseconds;
end record;
function Convert (I : Interval) return Duration;
function Convert (D : Duration) return Interval;
function Image (I : Interval) return String;
function Value (S : String) return Interval;
function Image (D : Duration) return String;
function Duration_Until (T : Time) return Duration;
function Duration_Until (T : Calendar.Time) return Duration;
function Duration_Until_Next
(H : Military_Hours; M : Minutes := 0; S : Seconds := 0)
return Duration;
-- Day of week support; Monday is 1.
type Weekday is new Positive range 1 .. 7;
function Day_Of_Week (T : Calendar.Time) return Weekday;
function Day_Of_Week (T : Time := Get_Time) return Weekday;
function Image (D : Weekday) return String;
function "+" (D : Weekday; I : Integer) return Weekday;
function "-" (D : Weekday; I : Integer) return Weekday;
end Time_Utilities;
nblk1=8
nid=5
hdr6=e
[0x00] rec0=1e rec1=00 rec2=01 rec3=026
[0x01] rec0=01 rec1=00 rec2=07 rec3=010
[0x02] rec0=19 rec1=00 rec2=08 rec3=060
[0x03] rec0=01 rec1=00 rec2=02 rec3=054
[0x04] rec0=16 rec1=00 rec2=03 rec3=040
[0x05] rec0=1d rec1=00 rec2=06 rec3=034
[0x06] rec0=08 rec1=00 rec2=04 rec3=000
[0x07] rec0=02 rec1=40 rec2=00 rec3=21e
tail 0x2150ab93682254d340b9c 0x42a00088462063203
Free Block Chain:
0x5: 0000 00 00 01 26 80 05 6b 64 61 79 3b 05 00 3f 20 20 ┆ & kday; ? ┆