Handbook
Glossary
adjust-federal-holiday ( timestamp -- timestamp )
Vocabulary
calendar
.
holidays
.
us
.
private
Inputs
timestamp
an
object
Outputs
timestamp
an
object
Definition
USING:
calendar
calendar.holidays.us
calendar.private
combinators
combinators.short-circuit
kernel
;
IN:
calendar.holidays.us.private
:
adjust-federal-holiday
( timestamp -- timestamp )
{
{
[
dup
{
[
dup
new-years-day
same-day?
]
[
saturday?
]
}
1&&
]
[
]
}
{
[
dup
saturday?
]
[
-1
days
(time+)
]
}
{
[
dup
sunday?
]
[
1
days
(time+)
]
}
[
]
}
cond
;