Giter Site home page Giter Site logo

Comments (2)

commenthol avatar commenthol commented on June 19, 2024

In reality this project relies heavily on moment-timezone. The important data here is the reliability on the timezone which uses data from IANA time zone database that is maintained and up to date.

Unfortunately moment-js is required for using moment-timezone.

I understand the current moment project status and the need to move to some other library instead.

Nonetheless I fear that this will cause major drawbacks with the accuracy. The IANA Database is usually maintained by the underlying OS. In case of nodeJS the timezone database seams to be queried by the included ICU library.

From https://stackoverflow.com/questions/55477931/where-does-node-js-get-the-timezone-data-from

Generally, it should be noted ICU data archive is updated less frequently than the IANA timezone data. Therefore, you may have to deal with outdated timezone information in Node.js even if you always install the latest Node.js LTS release. This is indicated by the tz properties value 2018e which indicates a fairly old version of timezone data. The current IANA timezone data is dated from March 2019

IMO Luxon or date-fns will suffer from this design decision.

If used in the browser, things tend to be worse.

From https://support.google.com/chrome/thread/139901584/does-chrome-use-iana-database-for-timezone-information?hl=en

Chrome on Windows uses the date and time settings built-in to Windows.

With moment-timezone it can be accomplished that the timezone-data is accurate amongst all clients and platforms. This is something I don't want to trade with tickets stating that this and that date is wrong, but in reality timezone data on that client is outdated.

I am following the Temporal.ZonedDateTime Proposal which I would consider as a replacement for moment-timezone. But again we'd need to see where to get really up to date timezone data amongst all clients using this library.

Maybe you are aware of a JS-project which uses IANA timezone data and offers this in a "tiny" library.

from date-holidays-parser.

stefanvanherwijnen avatar stefanvanherwijnen commented on June 19, 2024

Thanks for your thorough explanation. This should clear things up for everyone (including me) wondering why we are stuck with moment.

Unfortunately I am not aware of any alternatives myself. date-holidays works great, but I am getting errors when using it in the browser due to moment not supporting ESM. And since moment won't be updated, the best solution seems to be to find a suitable replacement for it.

from date-holidays-parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.