Handbook
Glossary
cal-args ( -- timestamp year? )
Vocabulary
tools
.
cal
Inputs
None
Outputs
timestamp
an
object
year?
an
object
Definition
USING:
accessors
calendar
combinators
command-line
kernel
math.parser
namespaces
sequences
sequences.extras
;
IN:
tools.cal
:
cal-args
( -- timestamp year? )
now
command-line
get
[
f
]
[
dup
first
{
{
"-m"
[
rest
?first2
swap
f
]
}
{
"-y"
[
rest
?first2
dup
[
swap
]
when
t
]
}
[
drop
?first2
dup
[
swap
]
when
dup
not
]
}
case
[
[
string>number
]
bi@
[
[
>>year
]
when*
]
[
[
>>month
]
when*
]
bi*
]
dip
]
if-empty
;