Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
day-of-week ( timestamp -- n )
Calendar
>
Calendar facts
Prev:
day-of-year ( timestamp -- n )
Vocabulary
calendar
Inputs and outputs
timestamp
a
timestamp
n
an
integer
Word description
Calculates the index of the day of the week. Sunday will result in an index of 0.
Examples
USING: calendar prettyprint ; now sunday day-of-week .
0
Definition
IN:
calendar
:
day-of-week
( timestamp -- n )
>date<
zeller-congruence
;