Handbook
Glossary
ymd>ordinal ( year month day -- ordinal )
Vocabulary
calendar
Inputs
year
an
object
month
an
object
day
an
object
Outputs
ordinal
an
object
Definition
USING:
kernel
math
math.functions
;
IN:
calendar
:
ymd>ordinal
( year month day -- ordinal )
[
leap-year?
dup
-2 -3
?
]
[
dup
3
<
[
12
+
]
when
[
1
-
30
*
]
[
1
+
0.6
*
floor
]
bi
+
]
[
]
tri*
+
+
>integer
swap
367 366
?
mod
;