-
-
Notifications
You must be signed in to change notification settings - Fork 5
Investigate how to migrate ecossystem libraries to Temporal instead of custom npm packages #248
Description
Hello everyone,
Creating this issue because Temporal reached Stage 4: https://caniuse.com/temporal its still not baseline and it will only may be next year or so but maybe we can start migrating to Polyfills.
Current Status
The two known Polyfills for temporal behavior are https://npmx.dev/package/temporal-polyfill and https://npmx.dev/package/@js-temporal/polyfill. The https://npmx.dev/package/temporal-polyfill seems to win in size at least from their comparison in github readme
Date libraries
The most used libraries to work with dates are:
- dayjs
- date-fns
- @internationalized/date
Those libraries are used to display dates, making calculations etc in consumers code but also used by libraries like calendars.
https://npmx.dev/package/dayjs
https://npmx.dev/package/date-fns
https://npmx.dev/package/@internationalized/date
https://npmx.dev/compare?packages=dayjs,date-fns,@internationalized/date

Calendar libraries
In terms of calendars we have a couple of known libraries:
- shadcn/ui their calendar uses https://npmx.dev/package/react-day-picker which depends on date-fns
- nuxt/ui calendar uses reka-ui calendar depends on @internationalized/date
What do you guys think ? How should we handle this ?
Dayjs
https://gameroman.github.io/e18e-tools/?package=dayjs&limit=10
| # | Downloads/month | Traffic | Version | Package |
|---|---|---|---|---|
| 1 | 20.31M | 3.00 TB | ^1.10.4 | cypress |
| 2 | 11.51M | 1.70 TB | ^1.8.34 | exceljs |
| 3 | 9.75M | 1.44 TB | ^1.11.19 | typeorm |
| 4 | 9.56M | 1.41 TB | 1.11.15 | pm2 |
| 5 | 8.65M | 1.28 TB | ^1.11.19 | mermaid |
| 6 | 8.35M | 1.23 TB | ^1.11.9 | twilio |
| 7 | 8.08M | 1.19 TB | ^1.11.11 | antd |
| 8 | 5.84M | 862.83 GB | ~1.8.24 | @pm2/agent |
| 9 | 4.93M | 727.57 GB | ^1.8.15 | logkitty |
| 10 | 2.02M | 299.06 GB | 1.11.13 | @reown/appkit-common |
date-fns
https://gameroman.github.io/e18e-tools/?package=date-fns&limit=10
| # | Downloads/month | Traffic | Version | Package |
|---|---|---|---|---|
| 1 | 30.95M | 99.09 TB | ^4.1.0 | react-day-picker |
| 2 | 10.73M | 34.36 TB | ^4.1.0 | react-datepicker |
| 3 | 6.70M | 21.44 TB | ^2.0.1 | listr-verbose-renderer |
| 4 | 1.53M | 4.91 TB | ^4.1.0 | @sanity/util |
| 5 | 1.40M | 4.49 TB | ^2.29.3 | @metamask/sdk-communication-layer |
| 6 | 1.34M | 4.31 TB | ^4.1.0 | @vuepic/vue-datepicker |
| 7 | 1.11M | 3.56 TB | ^2.30.0 | gatsby |
| 8 | 1.05M | 3.36 TB | 2.30.0 | @strapi/utils |
| 9 | 1.02M | 3.26 TB | ^3.6.0 | @lingui/cli |
| 10 | 1.00M | 3.20 TB | ^4.1.0 | @sanity/cli |
@internationalized/date
https://gameroman.github.io/e18e-tools/?package=%40internationalized%2Fdate&limit=10
| # | Downloads/month | Traffic | Version | Package |
|---|---|---|---|---|
| 1 | 8.76M | 1.35 TB | ^3.12.0 | @react-aria/i18n |
| 2 | 6.13M | 945.30 GB | ^3.12.0 | @react-types/calendar |
| 3 | 5.93M | 914.85 GB | ^3.12.0 | @react-types/datepicker |
| 4 | 5.83M | 899.23 GB | ^3.12.0 | @react-stately/datepicker |
| 5 | 5.80M | 893.65 GB | ^3.12.0 | @react-stately/calendar |
| 6 | 5.54M | 853.46 GB | ^3.12.0 | @react-aria/datepicker |
| 7 | 5.49M | 847.10 GB | ^3.12.0 | @react-aria/calendar |
| 8 | 3.14M | 484.27 GB | ^3.12.0 | react-aria-components |
| 9 | 1.81M | 279.54 GB | ^3.5.0 | reka-ui |
| 10 | 1.60M | 246.13 GB | 3.11.0 | @ark-ui/react |