Handbook
Glossary
cookie-string>timestamp ( str -- timestamp )
Vocabulary
calendar
.
parser
Inputs
str
a
string
Outputs
timestamp
a
timestamp
or
f
Word description
Parses a cookie expiration date. Legacy hyphenated and asctime-style dates without a timezone are interpreted as GMT. An explicit timezone is preserved. Returns
f
if the date cannot be parsed.
Definition
USING:
combinators.short-circuit
continuations
kernel
;
IN:
calendar.parser
:
cookie-string>timestamp
( str -- timestamp )
{
[
[
cookie-string>timestamp-1
]
[
2drop
f
]
recover
]
[
[
cookie-string>timestamp-2
]
[
2drop
f
]
recover
]
[
[
rfc822>timestamp
]
[
2drop
f
]
recover
]
}
1||
;