Silverfeelin / SkyGame-Planner

Sky:CotL unlock planner/tracker
Other
24 stars 3 forks source link

Change date library to Luxon #66

Closed Silverfeelin closed 8 months ago

Silverfeelin commented 8 months ago

I've been noticing some strange things working with dayjs in combination with local and Sky timezones. In particular the end date for the new Season of the Nine-Colored Deer was off by a day because the parsed date for March 31st was somehow 1 millisecond past the bounds of the day when using startOf('day') and endOf('day').

image

I 'm probably doing something wrong yet I don't know what (or how to properly it use the library). I can find similar issues online with dirty workarounds but I'd rather switch to a library that just.. works. Without the headaches.

Luxon seems to offer this and has built-in support for timezones, so I'm going to give that a try.

Silverfeelin commented 8 months ago

https://github.com/Silverfeelin/SkyGame-Planner/tree/luxon