Handbook
Glossary
timestamp
Calendar
Next:
duration
Vocabulary
calendar
Word description
A timestamp is a date and a time with a timezone offset. Timestamp slots must store integers except for
seconds
, which stores reals, and
gmt-offset
, which stores a
duration
. Compare two durations with the
<=>
word.
See also
duration
Definition
USING:
math
;
IN:
calendar
TUPLE:
timestamp
{
year
integer
initial:
0
}
{
month
integer
initial:
0
}
{
day
integer
initial:
0
}
{
hour
integer
initial:
0
}
{
minute
integer
initial:
0
}
{
second
real
initial:
0
}
{
gmt-offset
duration
initial:
T{
duration
}
}
;
Methods
USING:
calendar
classes.tuple
math.order
;
M:
timestamp
<=>
[
>gmt
tuple-slots
]
compare
;
USING:
accessors
calendar
kernel
;
M:
timestamp
april
clone
4
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
august
clone
8
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
clone
(clone)
[
clone
]
change-gmt-offset
;
USING:
calendar
calendar.english
sequences
;
M:
timestamp
day-name
day-of-week
day-names
nth
;
USING:
accessors
calendar
calendar.format
;
M:
timestamp
day.
day>>
day.
;
USING:
accessors
calendar
;
M:
timestamp
days-in-year
year>>
days-in-year
;
USING:
accessors
calendar
kernel
;
M:
timestamp
december
clone
12
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
easter
clone
dup
year>>
easter-month-day
swapd
>>day
swap
>>month
;
USING:
calendar
calendar.format
;
M:
timestamp
elapsed-time
ago
elapsed-time
;
USING:
accessors
calendar
kernel
;
M:
timestamp
february
clone
2
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
first-day-of-year
clone
1
>>month
1
>>day
;
USING:
accessors
calendar
kernel
;
M:
timestamp
january
clone
1
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
july
clone
7
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
june
clone
6
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
last-day-of-year
clone
12
>>month
31
>>day
;
USING:
accessors
calendar
;
M:
timestamp
leap-year?
year>>
leap-year?
;
USING:
calendar
calendar.format
logging.parser
;
M:
timestamp
log-timestamp.
write-timestamp
;
USING:
accessors
calendar
kernel
;
M:
timestamp
march
clone
3
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
may
clone
5
>>month
;
USING:
accessors
calendar
calendar.english
math
sequences
;
M:
timestamp
month-name
month>>
1
-
month-names
nth
;
USING:
accessors
calendar
kernel
;
M:
timestamp
november
clone
11
>>month
;
USING:
accessors
calendar
kernel
;
M:
timestamp
october
clone
10
>>month
;
USING:
calendar
formatting
pdf.values
sequences
;
M:
timestamp
pdf-value
"%Y%m%d%H%M%S"
strftime
"D:"
prepend
;
USING:
calendar
calendar.format
present
;
M:
timestamp
present
timestamp>string
;
USING:
calendar
calendar.format
;
M:
timestamp
relative-time
ago
relative-time
;
USING:
calendar
calendar.format
yaml.conversion
;
M:
timestamp
represent-scalar
timestamp>rfc3339
;
USING:
accessors
calendar
kernel
;
M:
timestamp
september
clone
9
>>month
;
USING:
calendar
threads
;
M:
timestamp
sleep-until
now
time-
sleep
;
USING:
calendar
calendar.private
kernel
;
M:
timestamp
time+
[
clone
]
dip
(time+)
;
USING:
calendar
calendar.private
;
M:
timestamp
time-
(time-)
seconds
;
USING:
accessors
calendar
combinators.short-circuit
kernel
;
M:
timestamp
weeks-in-week-year
{
[
january
1
>>day
thursday?
]
[
december
31
>>day
thursday?
]
}
1||
53 52
?
;
USING:
calendar
calendar.format
cbor
cbor.private
;
M:
timestamp
write-cbor
0 6
write-integer
timestamp>rfc3339
write-cbor
;
USING:
calendar
kernel
yaml.conversion
yaml.ffi
;
M:
timestamp
yaml-tag
drop
YAML_TIMESTAMP_TAG
;
USING:
accessors
calendar
calendar.format
;
M:
timestamp
year.
year>>
year.
;