Handbook
Glossary
same-or-previous-business-day ( timestamp -- timestamp' )
Vocabulary
calendar
Inputs
timestamp
an
object
Outputs
timestamp'
an
object
Definition
USING:
combinators
kernel
;
IN:
calendar
:
same-or-previous-business-day
( timestamp -- timestamp' )
dup
day-of-week
{
{
0
[
-2
days
time+
]
}
{
6
[
friday
]
}
[
drop
]
}
case
;