Handbook
Glossary
parse-rfc822-gmt-offset ( string -- dt )
Vocabulary
calendar
.
parser
Inputs
string
an
object
Outputs
dt
an
object
Definition
USING:
assocs
calendar
combinators
kernel
math.parser
sequences
;
IN:
calendar.parser
:
parse-rfc822-gmt-offset
( string -- dt )
{
{
[
dup
{
"UTC"
"GMT"
}
member?
]
[
drop
instant
]
}
{
[
dup
length
1
=
]
[
parse-rfc822-military-offset
]
}
{
[
dup
rfc822-named-zones
key?
]
[
rfc822-named-zones
at
hours
]
}
[
unclip
[
2
cut
[
string>number
]
bi@
[
hours
]
[
minutes
]
bi*
time+
]
dip
signed-gmt-offset
]
}
cond
;