js-temporal / temporal-developer-education Goto Github PK
View Code? Open in Web Editor NEWTemporal developer education tasks
License: MIT License
Temporal developer education tasks
License: MIT License
Originally from tc39/proposal-temporal#105
How does Temporal compare to date-time libraries in other programming languages, and to JavaScript date-time libraries in the ecosystem?
DateOnly
DateTime
DateTimeOffset
TimeOnly
TimeSpan
TimeZoneInfo
ZonedDateTime
The joda-time library that resulted in JSR-310 and became part of the language in Java 8.
Comparison already done: http://widdindustries.com/ecma-temporal-vs-java-time/
Brief overview of the JS libraries above: https://github.com/you-dont-need/You-Dont-Need-Momentjs#brief-comparison
Originally from tc39/proposal-temporal#861
A page with guidance for library authors could include:
There's some overlap with user-facing guidance, but I suspect that some of the issues that library authors run into (e.g. how to pick types properly to minimize their users running into errors) might be unique to libraries.
Justin Grant tweeted a challenge to verify Temporal against https://yourcalendricalfallacyis.com/: https://twitter.com/justingrantjg/status/1305590409268064256
We should have a page responding to each of these fallacies explaining how Temporal meets or doesn't meet them. Not all are applicable.
Archiving the Twitter thread in case of unavailability:
@justingrantjg
The best way to get help online is to boldly claim something falsifiable, so... I assert that https://github.com/tc39/proposal-temporal will handle all of http://yourcalendricalfallacyis.com.
Think I'm wrong? Prove it at tc39/proposal-temporal#893
@devongovett
My claim was that none of the existing popular libraries handle this. I’m excited about Temporal for sure!
One thing Temporal explicitly doesn’t handle according to the readme is leap seconds. Unclear to me how that would manifest. Several of the fallacies make mention of that though.
@justingrantjg
Yeah, Temporal won't crash from leap seconds (treat 23:59:60 as 23:59:59 when parsing) but leap seconds may be better handled via building a custom TAI timezone e.g. https://github.com/ryzokuken/temporal-tai/blob/master/index.mjs
Anyone with a better idea is welcome to contribute it at https://github.com/tc39/proposal-temporal!
Originally from tc39/proposal-temporal#104
Temporal subsumes most of the functionality of Moment.js, but there's a ton of code out there using Moment, and it will take a long time to upgrade to the Temporal API. To make the transition easier, while reducing download size, it'd be great to have an implementation of most of the Moment API in terms of Temporal, if this is possible. Same for Luxon or date-fns.
Link to some experimentation with date-fns: https://github.com/ptomato/temporal-fns/commits/port-to-temporal
Originally from tc39/proposal-temporal#655
It would be useful to have a "Which Temporal type do I use" flowchart in the documentation, similar to "Which STL container do I use"
See also
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.