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