jaywyeee / arknights-calendar

Event schedules of Arknights
https://ak.jaywye.ee/calendar
MIT License
15 stars 3 forks source link

Permanent events do not overlap correctly on Safari #14

Closed jaywyeee closed 2 years ago

jaywyeee commented 2 years ago

Permanent events (e.g. Episodes, Integrated Strategies) do not overlap over normal events like on Chromium browsers and end up at the end of the grid container (.events), while also pushing normal events over.

This appears to be caused by a fault in the JavaScript, as can be seen from --grid-column: NaN / span 2:

Ao4zBSb

jaywyeee commented 2 years ago

This issue was caused because WebKit resolves new Date([2022, 1, 1]) to Invalid Date whereas Chromium resolves it to Jan 01 2022. The Chromium implementation is bad because it ignores the zero-index format of months and should have returned an error like WebKit. For example, the extremely similar new Date(2022, 1, 1), which omits the array and is one of the standard ways to create a Date object, resolves to Feb 1 2022.