I looked at 'todayno' from dates.ijs, found it interesting since it is
drastically different from how I have always done it.
Heres mine
day=: 3 : 0
0 day y
:
if. x do. y=.0 100 100#: y end.
g=.365&* + -/@:(<.@:%&4 100 400)
m=.31 59 90 120 151 181 212 243 273 304 334
(g <:{.y)+({:y)+(1{y){0 0,m+0,10#-/0=4 100 400|y
)
ts'todayno 2003 12 5'
.0002117 6464
ts'day 2003 12 5'
.000132 6784
Note that day starts at 1 1 1, not 1800 1 1, but aside from that I seem to
get correct answers, at least they agree with todayno, except for 1 1 1
difference.
Ralph Selfridge
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm