date-fns-timezone icon indicating copy to clipboard operation
date-fns-timezone copied to clipboard

Plans for date-fns v2?

Open motin opened this issue 6 years ago • 10 comments

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?

motin avatar Nov 14 '18 07:11 motin

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.

prantlf avatar Nov 17 '18 14:11 prantlf

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.

stevensacks avatar Sep 02 '19 04:09 stevensacks

any updates on this? is v2 support planned? do you need any help? or is this project done?

ngehlert avatar Oct 23 '19 15:10 ngehlert

I'm still on date-fns 1.x because of this compatibility uncertainty.

jkeen avatar May 13 '20 14:05 jkeen

Looks like this project is unmaintained? no activity for a year

osdiab avatar May 29 '20 12:05 osdiab

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 avatar May 29 '20 15:05 ngehlert

@ngehlert Got anything you can PR?

jkeen avatar Dec 09 '20 03:12 jkeen

Wait wait wait, did v2 make this library unnecessary? https://date-fns.org/v2.16.1/docs/Time-Zones

jkeen avatar Dec 09 '20 03:12 jkeen

@jkeen That library requires the browser to support parts of Intl that IE lacks. This library works with IE.

erikt9 avatar Dec 09 '20 03:12 erikt9

@erikt9 Ahh is that all? That helps me out, because my app doesn't support IE. Thanks!

jkeen avatar Dec 09 '20 03:12 jkeen