marnusw / date-fns-tz

Complementary library for date-fns v2 adding IANA time zone support
MIT License
1.06k stars 116 forks source link

Feature request: Compatibility with setDefaultOptions in date-fns #233

Closed lnunno closed 6 days ago

lnunno commented 1 year ago

I'm not sure if this is expected to work, but I'm not seeing the options being passed into setDefaultOptions being respected by this library and instead have to pass in the options to each function call, for example formatInTimeZone needs the locale specified and doesn't use the one provided in setDefaultOptions

marnusw commented 1 year ago

You're right, it's not respected. I was either not aware of that function in date-fns or it's fairly new to be honest. Happy to support that though. I'll leave this open for when I have time or would be happy looking at a PR.

ArianHamdi commented 1 year ago

This is really helpful.