JavaScript Dates Are About to Be Fixed

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • t-a-i

    Converts Unix milliseconds to and from International Atomic Time (TAI) milliseconds

    > Does this mean that converting two DateTimes into their POSIX time and subtracting them will not yield an accurate representation of number of seconds between two timestamps?

    It does, so if you care about that difference, you should not do that, and use something like https://github.com/qntm/t-a-i

    > Am I naive? It seems like POXIS ignoring leap seconds is a major mistake.

    Depending on your needs it can be either seen as a massive mistake or a big convenience win.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • V8

    The official mirror of the V8 Git repository

    Thank god!

    Presumably this new API will fix the fact that JS does in fact know about some time zones, but not most.

    Shield your eyes from this monstrosity that will successfully parse some dates using `new Date()` in some select special time zones, but assume UTC in the other cases:

    https://github.com/v8/v8/blob/781c20568240a1e59edcf0cb5d713a...

  • moonfire-nvr

    Moonfire NVR, a security camera network video recorder

    Temporal will be really nice in that it supports remote time zones, allows you to iterate through daylight saving transitions, etc.

    I can't wait for it to be fully taken advantage of by things such as mui's date time picker. Imagine if after selecting the fall back day, it let you pick a time during the extra hour. If after selecting the spring forward day, it wouldn't let you pick a time during the hour that doesn't exist.

    This stuff matters sometimes; a user of my NVR wanted to save a clip during the fall back hour and got the wrong result because these things just don't work right today. https://github.com/scottlamb/moonfire-nvr/issues/244

  • proposal-decimal

    Built-in exact decimal numbers for JavaScript

    > - Where are decimals, to avoid things like `parseInt(0.00000051) === 5`?

    There is a draft proposal for this: https://github.com/tc39/proposal-decimal

    Additionally, BigInt has been available for years: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

    > - Why are inbuilt globals allowed to be modified?

    > Error/null handling are still haphazard things.

    How would you suggest addressing these in a way that is backwards compatible with all existing web content?

  • whenever

    ⏰ Modern datetime library for Python, available in Rust or pure Python (by ariebovenberg)

    Here's a nice modern Python library in this space that claims to take influence from Temporal and Chrono - https://github.com/ariebovenberg/whenever

  • agendas

    TC39 meeting agendas

  • temporal-polyfill

    Polyfill for Temporal (under construction)

    I’ve been using Temporal, via a different polyfill than in the article[1], in production for about 6 months now. It’s a game changer. But JavaScript people are also broken from years of not having this so it’s been a hard sell. To many it’s just extra work. We’re about to start doing international stuff though so really hoping it becomes clear why it’s amazing to the team soon.

    [1]: https://github.com/js-temporal/temporal-polyfill

  • proposal-temporal-v2

    Future additions to Temporal

    This is great but I really hope someone contributes strftime / TR35 to the v2 proposal, there's still no way to get date format string in JS like this: "%Y-%m-%d_%H-%M-%S_%s", or this "%m/%d/%H/%M:%S".

    - https://github.com/js-temporal/proposal-temporal-v2/issues/5...

  • proposal-temporal

    Provides standard objects and functions for working with dates and times.

    Where can I find production-ready polyfills? https://github.com/tc39/proposal-temporal/#polyfills only lists alpha and beta versions.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Deno 2: A New Era or Just a Sidekick to Node.js?

    2 projects | dev.to | 30 Sep 2024
  • Rewriting Rust

    23 projects | news.ycombinator.com | 25 Sep 2024
  • GraalPy – A high-performance embeddable Python 3 runtime for Java

    14 projects | news.ycombinator.com | 17 Sep 2024
  • Show HN: Free e-book about WebGPU Programming

    2 projects | news.ycombinator.com | 5 Aug 2024
  • The Origin of Emacs in 1976

    4 projects | news.ycombinator.com | 23 Jul 2024

Did you konow that HTML is
the 11th most popular programming language
based on number of metions?