Handbook
Glossary
tzfile>transitions ( tzfile -- transitions )
Vocabulary
tzinfo
.
private
Inputs
tzfile
an
object
Outputs
transitions
an
object
Definition
USING:
accessors
assocs
calendar
combinators
kernel
sequences
;
IN:
tzinfo.private
::
tzfile>transitions
( tzfile -- transitions )
tzfile
abbrevs>>
tznames
:>
abbrevs tzfile
is-std>>
:>
is-std tzfile
is-gmt>>
:>
is-gmt tzfile
types>>
[
[
{
[
tt_gmtoff>>
seconds
]
[
tt_isdst>>
1
=
]
[
tt_abbrind>>
abbrevs
at
]
}
cleave
]
dip
[
is-std
?nth
dup
[
1
=
]
when
]
[
is-gmt
?nth
dup
[
1
=
]
when
]
bi
<local-time>
]
map-index
:>
local-times tzfile
transition-times>>
tzfile
local-times>>
[
[
dup
unix-time>timestamp
]
[
local-times
nth
]
bi*
<transition>
]
2map
;