Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Tradeoffs vs js-temporal/temporal-polyfill? #22

Closed
lionel-rowe opened this issue Dec 12, 2023 · 4 comments
Closed

Documentation: Tradeoffs vs js-temporal/temporal-polyfill? #22

lionel-rowe opened this issue Dec 12, 2023 · 4 comments

Comments

@lionel-rowe
Copy link

It would be good to include a list of tradeoffs vs https://github.com/js-temporal/temporal-polyfill in the README or elsewhere in the documentation. Something like this:

Feature fullcalendar/temporal js-temporal/temporal-polyfill
Design goals (Fully?) spec-compliant implementation (and/or other goals?) Fully spec-compliant implementation and validation of the Temporal API to get feedback for the spec
Bundle size 55.7 kB minified; 17.3 kB minified + gzipped 226.1 kB minified; 56.7 kB minified + gzipped
bigint support Native support in modern JS environments; no bigint support for legacy environments Default build includes JSBI to support bigints in legacy environments
Calendar support ISO8601 (+ others?) ISO8601 + various others
Import behavior Polyfill import 'temporal-polyfill/global' or ponyfill import { Temporal } from 'temporal-polyfill' Ponyfill only import { Temporal } from '@js-temporal/polyfill'
@arshaw
Copy link
Member

arshaw commented Jan 7, 2024

This a great idea. While releasing v0.2.0 I created it:
https://github.com/fullcalendar/temporal-polyfill/blob/v0.2.0/README.md#comparison-with-js-temporalpolyfill

Feedback welcome. Thanks!

@quantuminformation
Copy link

i thought for a min that temportal was supported in safari, until i realised it was a polyfill

still not sure what repo to pick

is Temporal such a big leap from js date?

i was thinking of using it in my project https://github.com/quantuminformation/drizzle-sqlite-recurring-events as its new, and Temporal might be the way to go guys?

@quantuminformation
Copy link

pls convince me to use your repo

@lionel-rowe
Copy link
Author

@quantuminformation Temporal is a massive improvement over Date. As noted by the Temporal Proposal docs:

Date has been a long-standing pain point in ECMAScript. This is a proposal for Temporal, a global Object that acts as a top-level namespace (like Math), that brings a modern date/time API to the ECMAScript language. For a detailed look at some of the problems with Date, and the motivations for Temporal, see: Fixing JavaScript Date.

Temporal is currently a Stage 3 proposal. HOWEVER, there are currently no native implementations of Temporal in any browser or JS runtime — that's why you currently need to use a polyfill/ponyfill (either fullcalendar/temporal or js-temporal/temporal-polyfill).

Basically, Temporal is the future but has no native support, whereas Date is what's currently supported everywhere (and it will remain around forever even once Temporal is widespread). Which you should use as of January 2024 depends on the needs of your project.

@arshaw arshaw closed this as completed Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants