Handbook
Glossary
relative-time ( seconds -- string )
Vocabulary
calendar
.
format
Inputs
seconds
an
object
Outputs
string
an
object
Definition
IN:
calendar.format
GENERIC:
relative-time
( seconds -- string )
Methods
USING:
calendar
calendar.format
;
M:
duration
relative-time
duration>seconds
relative-time
;
USING:
calendar.format
kernel
math
sequences
;
M:
real
relative-time
[
relative-time-offset
]
[
dup
abs
1
<
[
drop
]
[
0
<
"hence"
"ago"
?
" "
glue
]
if
]
bi
;
USING:
calendar
calendar.format
;
M:
timestamp
relative-time
ago
relative-time
;