6 ms·
Agreed. We've almost eradicated our usage of JS Date - fixing plenty of bugs along the way, and then I extracted thousands of lines of conversions and formattin
by anowell 7mo ago
Agreed. We've almost eradicated our usage of JS Date - fixing plenty of bugs along the way, and then I extracted thousands of lines of conversions and formatting from our production app (scheduling focused) into a temporal-fun package to make it Temporal more ergonomic for lots of common cases.
npmjs.com/package/temporal-fun
- 698969 7mo agoThat looks neat although your package is missing a link to the source repository.
- anowell 7mo agoGood catch. Will get that added today. github.com/howie-code/temporal-fun
- lightwords 7mo agoWord of warning Temporal relies on the Intl API for formatting, and support in Chrome is very limited due to their binary size constraints. As a result, you'll need to polyfill unsupported languages using format.js
- rafram 7mo ago$ du -sh '/Applications/Google Chrome.app' 1.3G /Applications/Google Chrome.app
- lightwords 7mo agoThere are numerous reports on this being an issue e.g. https://issues.chromium.org/issues/40624456 https://issues.chromium.org/issues/40624456
- anowell 7mo agoThanks for the heads up. Will think on this and will probably just document the polyfill.
- jacquesm 7mo agoThat's complete crazy.
- TimTheTinker 7mo agoFormat.js polyfills a lot of stuff that's already supported in modern browsers, and seems to prefer its own polyfills to the native APIs. Is there any way to force it to only use (and bundle) the polyfills that are needed assuming 2025+ era browsers?