temporal-polyfill
proposal-temporal
temporal-polyfill | proposal-temporal | |
---|---|---|
2 | 93 | |
171 | 3,141 | |
19.9% | 1.6% | |
9.9 | 9.4 | |
about 1 month ago | 7 days ago | |
TypeScript | HTML | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
temporal-polyfill
-
Temporal API - A new approach to managing Date and Time in JS | refine
There's another, much smaller polyfill: https://github.com/fullcalendar/temporal
-
Why Am I Excited About WebAssembly?
This assumes two things though, and this is another point I just realized about WASM that I like, which is for (most) modern browsers asm.js / WASM doesn't have to be polyfilled, therefore with Temporal we have to consider the following:
1. Browser support - its not there yet. you'd have to polyfill. A production level polyfill is 16 KB, and is still very nasacent, and, on top of that, requires support also for BigInt[0]. The polyfill that tc39 put out is decidedly marked as non-production ready[1].
2. Polyfilling - as mentioned above, we have to deal with polyfilling the API, and that isn't a clear and easy story yet. WASM support goes back farther than this.
3. Size - its entirely possible to get WASM builds under 16 KB, and the support is better, espcially for operations on strings and numbers (dates fit this category well). The only complication I haven't quite solved yet is:
A) Can I validate that a WASM build will be under 16 KB. This is crucial. I'd even accept it at 20 KB because of wider browser support[2]
B) Can I fall back to asm.js if needed (there is a slim range of browsers that support ASM.js but not WASM, mostly pre-chromium Edge[3]
C) Is it performant compared to something like Luxon or date-fns? WASM excels at string / numerical operations so my sneaking suspicion is yes, at least in terms of the WASM operations. The complexity will be serializing the operations to a JS Date instance, Luxon & the Intl API might be most useful here
[0]: https://github.com/fullcalendar/temporal/blob/main/packages/...
[1]: https://github.com/tc39/proposal-temporal#polyfills
[2]: https://caniuse.com/wasm
[3]: https://caniuse.com/asmjs
proposal-temporal
-
Handling dates in JavaScript with Tempo
Even with the initial pitfalls of JavaScript dates, the ecosystem managed to tackle those challenges with good libraries. Some use the native JavaScript date while others have instead created their own robust tools to make up for the quirks JavaScript dates might have. With the JavaScript Temporal API about to roll out, working with dates and time in JavaScript will only improve.
-
Mastering Time: State-of-the-Art Date Handling in JavaScript
Temporal API
- TC39 Temporal Proposal
- Handling Hindu Lunisidereal Calendars
- Replacing Date with Temporal – ECMAScript Stage 3 Proposal
- Temporal, a modern date/time API for ECMAScript
- Temporal proposal reaches stage 4
-
Show HN: Trigger.dev V2 – a Temporal alternative for TypeScript devs
In the TypeScript/JavaScript world the only thing called "Temporal" that I was aware of is the Stage 3 proposal for an excellent new date and time module:
https://tc39.es/proposal-temporal/docs/
-
Updates from the 97th TC39 meeting
Time Zone Canonicalization: Stacked on Temporal to improve handling of changes to the IANA Time Zone Database.
- IAMA senior javascript dev, ask me anything
What are some alternatives?
memory64 - Memory with 64-bit indexes
moment - Parse, validate, manipulate, and display dates in javascript.
raylib-5k
dayjs - ⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
botnet - Multiplayer programming game using Rust and WebAssembly
Luxon - ⏱ A library for working with dates and times in JS
Graal - GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
date-fns - ⏳ Modern JavaScript date utility library ⌛️
quickjs-emscripten - Safely execute untrusted Javascript in your Javascript, and execute synchronous code that uses async functions
You-Dont-Need-Momentjs - List of functions which you can use to replace moment.js + ESLint Plugin
design - WebAssembly Design Documents
sdk-typescript - Temporal TypeScript SDK