Handbook
Glossary
parse-elapsed-time ( string -- duration )
Vocabulary
calendar
.
format
Inputs
string
an
object
Outputs
duration
an
object
Definition
USING:
calendar
combinators
kernel
math.parser
sequences
splitting
;
IN:
calendar.format
:
parse-elapsed-time
( string -- duration )
" "
split
[
unclip-last
[
string>number
]
dip
{
{
115
[
seconds
]
}
{
109
[
minutes
]
}
{
104
[
hours
]
}
{
100
[
days
]
}
{
119
[
weeks
]
}
{
121
[
years
]
}
}
case
]
[
duration+
]
map-reduce
;