Handbook
Glossary
weeks-in-week-year ( obj -- n )
Vocabulary
calendar
Inputs
obj
an
object
Outputs
n
an
object
Definition
IN:
calendar
GENERIC:
weeks-in-week-year
( obj -- n )
Methods
USING:
calendar
combinators.short-circuit
kernel
math
;
M:
integer
weeks-in-week-year
{
[
1 1
<date>
thursday?
]
[
12 31
<date>
thursday?
]
}
1||
53 52
?
;
USING:
accessors
calendar
combinators.short-circuit
kernel
;
M:
timestamp
weeks-in-week-year
{
[
january
1
>>day
thursday?
]
[
december
31
>>day
thursday?
]
}
1||
53 52
?
;