date-fns-timezone
date-fns-timezone copied to clipboard
Plans for date-fns v2?
Great job in making it possible to work with timezones using date-fns v1! How well does this work with date-fns v2 alpha currently? Will this library live on after v2 release or deprecated once v2 is available and https://github.com/date-fns/date-fns/pull/707 is merged? Or will you port your changes to a new PR for v2?
Thanks for the warn words, @motin! I use only public interface of parse
and format
; it will depend on if v2 breaks it or not. I should like to have a look it.
I intend to maintain this library for both v1 and v2. v2, once I get my hands on it :-) I'll consider opening a PR for date-fns
.
https://github.com/date-fns/date-fns/pull/707 takes a different approach - it uses the native Intl
API. You need a modern browser with its support, or a Node.js build with the full ICU (or the full-icu-data
module) if you use it.
I integrated timezone-support
, which uses the time zone data from a JavaScript module; either a bundled one or a custom one. It is more flexible, than the native API, but it is customizable and running everywhere today.
V2 is out now and its format
function has changed quite a bit, but I'm not sure if it causes breaking changes for this library. I haven't noticed any issues with formatToTimeZone
yet but I'm only using it at its most basic thus far.
any updates on this? is v2 support planned? do you need any help? or is this project done?
I'm still on date-fns
1.x because of this compatibility uncertainty.
Looks like this project is unmaintained? no activity for a year
looks like it. I recently upgraded to date-fns 2x in a project and just extracted and build the stuff I needed by myself... :(
@ngehlert Got anything you can PR?
Wait wait wait, did v2 make this library unnecessary? https://date-fns.org/v2.16.1/docs/Time-Zones
@jkeen That library requires the browser to support parts of Intl
that IE lacks. This library works with IE.
@erikt9 Ahh is that all? That helps me out, because my app doesn't support IE. Thanks!