moment-timezone icon indicating copy to clipboard operation
moment-timezone copied to clipboard

Missing "AN" ISO Country code for Netherlands Antilles

Open visen9 opened this issue 3 years ago • 1 comments

Moment-timezone version which you use:

Version: "moment-timezone": "^0.5.31",

Issue description:

Calling moment.tz.zonesForCountry("AN", true) returns null. This happens because there isn't any "AN" code in the library (see moment.tz.countries()). Please add the "AN" country code (Netherlands Antilles) to solve the issue :)

visen9 avatar Apr 07 '21 16:04 visen9

The country data comes from the IANA time zone database, which doesn't have the AN code listed. The main reason for this is that the Netherlands Antilles hasn't officially existed since 2010 (see Dissolution of the Netherlands Antilles). It was split into several entities, each of which has an entry in Moment Timezone's country data:

  • Caribbean Netherlands (code BQ).
  • Curaçao (code CW).
  • Sint Maarten (code SX).

gilmoreorless avatar Apr 16 '21 06:04 gilmoreorless