Skip to content

Note that the day header hook receives a Date generated in UTC.#237

Open
rjkip wants to merge 1 commit intofullcalendar:mainfrom
rjkip:patch-1
Open

Note that the day header hook receives a Date generated in UTC.#237
rjkip wants to merge 1 commit intofullcalendar:mainfrom
rjkip:patch-1

Conversation

@rjkip
Copy link
Copy Markdown

@rjkip rjkip commented Jul 3, 2024

I used the Intl facility to render day headers in users' locales. This renders dates in the user's time zone, whereas the provided Date was created in UTC. This caused a surprise for users "west" of UTC, where the day header rendered a day previous. People living in +13:00 would have seen the day after!

Happy to make any adjustments to the changes or the commit message!

For day headers that do not represent specific dates, like weekdays in a month view, the provided `Date` instant must be interpreted as UTC. If not done so, day headers may show the wrong weekday.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant