Handbook
Glossary
read-date-timestamp ( -- timestamp )
Vocabulary
images
.
tga
Inputs
None
Outputs
timestamp
an
object
Definition
USING:
accessors
calendar
endian
io
kernel
ranges
sequences
;
IN:
images.tga
:
read-date-timestamp
( -- timestamp )
timestamp
new
2
read
le>
dup
12
[1..b]
member?
[
bad-tga-timestamp
]
unless
>>month
2
read
le>
dup
31
[1..b]
member?
[
bad-tga-timestamp
]
unless
>>day
2
read
le>
>>year
2
read
le>
dup
23
[0..b]
member?
[
bad-tga-timestamp
]
unless
>>hour
2
read
le>
dup
59
[0..b]
member?
[
bad-tga-timestamp
]
unless
>>minute
2
read
le>
dup
59
[0..b]
member?
[
bad-tga-timestamp
]
unless
>>second
;
inline