[tz] New IANA-timezone support date/time library

Gilmore Davidson gilmoreorless at gmail.com
Wed Feb 24 01:10:03 UTC 2021

Kerry, that library looks like a good addition to the JS ecosystem. The
APIs around discontinuities and live updates are not easily found in most
other JS libraries. Though I have some queries, based on some of the larger
community grumblings about the old Moment API:

1. I'm intrigued by the dual mutable/immutable modes. Moment.js being
mutable caused a lot of bugs and confusion, and most other libraries since
then have been immutable-only.
2. Is it possible for consumers to compile their own version of the data? I
couldn't see any reference to how the custom data files are compiled. With
Moment Timezone being in maintenance mode, its releases aren't always
keeping up with tzdb updates, but at least there's a documented procedure
for people to be able to compile and load the data themselves.
3. The compiled data files appear to contradict the tzdb source when it
comes to primary zones vs aliases. For example, in tzdb Australia/Sydney is
a primary Zone entry, with aliases such as Australia/ACT and Australia/NSW.
But I noticed your library has Australia/ACT as the primary entry instead.
(To be fair, Moment Timezone also has this issue, due to the way its data
files are compiled [1].)
4. As I think someone else mentioned, we're trying to discourage the raw
display of time zone identifiers to end users, because they're very often
misinterpreted. The "theory" file in tzdb has more detail [2]. I think
having an API to return zone identifiers grouped by region might encourage
the display of identifiers in zone picker interfaces, which we'd like to

On another note, there is a proposal currently being developed for a new
core JS API around date/time handling:

The API is close to being finalised, but I encourage you to take a look at
the proposal and give any feedback you might have. Your experience in
building this library would be helpful in identifying potential problems,
especially regarding different calendars.

[1]: https://github.com/moment/moment-timezone/issues/835
[2]: https://data.iana.org/time-zones/theory.html#naming

On 24 Feb 2021, at 06:07, Paul Eggert via tz <tz at iana.org> wrote:

Thanks for mentioning this. I installed the attached to link to it, as well
to some other libraries I found (this seems to be an area that's rapidly

I am by no means up-to-speed on JavaScript support for tzdb, so please feel
free to suggest further changes.

Paul, that list looks good to me. You've captured the main libraries
favoured by the JS community.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20210224/34660235/attachment.html>

More information about the tz mailing list