DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦568d29f05⟧ TextFile

    Length: 1536 (0x600)
    Types: TextFile
    Names: »epoch1900tx«

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦80900d603⟧ »giprocfile« 
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦80900d603⟧ »giprocfile« 
            └─⟦this⟧ 

TextFile



;       epoch 1900 tx         * page 1   27 10 76, 15.35;  

;  e p o c h - 1 9 0 0
;  *******************

epoch_1900 = set 1 disc
epoch_1900 = algol message.no

external real procedure epoch_1900(date);  
_________________________________________

value   date;  
long    date;  

begin

  comment

  The procedure compute the time interval in units of days
  from epoch 1900 (A.D. 1900 January 0.5) to the epoch given
  by the parameter which must be a GI-standard date.

  Call:
  epoch_1900(date)

  Parameters:
  epoch_1900 (return value, real). The computed interval.
  date       (call   value, long). The date.

  Example:
  The Julian day number of run-time can be written on current
  output by the call
  write(out, entier epoch_1900(date_time) + 2415020)

  Willy Lehmann Weng.
  GI, October 1976, Reg-no 76044.

  ;  

  integer days, i_date, year, month, day, h, m;  

  i_date:=   date //10000;  
  year  := i_date mod 100;  
  month :=(i_date //  100) mod 100;  
  day   := i_date //10000;  
  if month <= 0 or month > 12 or
  day <= 0 or day > 31 then system(9, 0, <:<10>ill.date:>);

  days  := year * 365 +
  (year - (if (year > 3 and month < 3 ) then 1 else 0)) // 4 +
  (case month of
  (0,  31,  59,  90,  120, 151, 
  181, 212, 243, 273, 304, 334))  + day;  

  h     := (date //  100) mod 100;  
  m     :=  date mod 100;  

  epoch_1900 := days + h/24 + m/1440 - 0.5;  

  ;  

end of procedure body;  
end

if warning.yes
(mode 0.yes ;  set error flag
message epoch1900 not ok
)
▶EOF◀