prantlf / date-fns-timezone

Parsing and formatting date strings using IANA time zones for date-fns.
MIT License
137 stars 18 forks source link

IE error occured #2

Closed AndriiDidkivsky closed 5 years ago

AndriiDidkivsky commented 5 years ago

Hi. I've got an error in IE "Expected identifier". As I understood it caused bacause timezone-support is into ES5. Because in debug mode i see function c({year:n,month:e,day:l,hours:t,minutes:o,seconds:i=0,milliseconds:u=0}){return Date.UTC(n,e-1,l,t,o,i,u)}.

Could you check please ?

prantlf commented 5 years ago

Yes, it appears to be caused by the lack of testing on IE, like the similar issue in timezone-support.

AndriiDidkivsky commented 5 years ago

timezone-support resolved, but if I install date-fns-timezone package then 1.5.4 dep installed. there is only way to resolve - obviously install 1.5.5 in the project. Check please

AndriiDidkivsky commented 5 years ago

it was npm cache :(

prantlf commented 5 years ago

So it was the timezone-support! I checked, that the output cjs modules have been babelified already in this module. I upgraded the timezone-support to 1.5.5 and released it as 0.1.4. You shouldn't need to override the module version any more.

Thank you!