apl>" <------------------------- sam095.txt -------------------------------> apl>" <--- DAYNO - Day number for astronomers. ----------------------------> apl>" <--- From: "The APL Handbook of Techniques" copyright IBM 1978. ----> apl>a # 1 59 R 'z # dayno date;c;d;jf;m;s;y ' apl>a # a,[1] '"Compute Julian day number. Date is a vector or array ' apl>a # a,[1] '"whose rows are month,day,year,style. Style is an optional' apl>a # a,[1] '"logical value = 1 if the new style (gregorian) calendar ' apl>a # a,[1] '"should be used. The julian day is a continuous count that' apl>a # a,[1] '"began at 0 at noon, 1/1/-4712 (i.e. 4713 BC). ' apl>a # a,[1] 'date # ( -2 Y 1 , R date ) R date ' apl>a # a,[1] 'y # date [ ; 2 + Lio ] ' apl>a # a,[1] 'd # date [ ; 1 + Lio ] ' apl>a # a,[1] 'm # date [ ; Lio ] ' apl>a # a,[1] 'z # 100 B y , [Lio] m , [Lio _ 0.5] d ' apl>a # a,[1] 's # (z>19230114) V (z>15821025) & (date,z>17520902)[;3+Lio]' apl>a # a,[1] 'c # ( 2 X ~ s ) + 0.75 X s X D 0.01 X y _ jf # 2 Z m ' apl>a # a,[1] 'z # 30+d+(D367Xjf+(m_2)%12)_ S c _ D 365.25 X 4712 + y _ jf' apl>Lfx a dayno apl>dayno 5 17 1977 2443280 apl>)off