fix all-day events

This commit is contained in:
Stefan Bühler 2025-01-24 18:01:20 +01:00
parent b32c8e24be
commit 52fe090a53

View File

@ -87,7 +87,7 @@ function display_event_date(item) {
if (start_time === "00:00" && end_time === "00:00") {
// localtime "all-day" event
const end_day = new Date(end.valueOf() - 86400);
const end_day = new Date(end.valueOf());
const end_day_date = fmt_date.format(end_day);
if (start_date === end_day_date) {
return display_date_local(start, start_date);
@ -98,7 +98,7 @@ function display_event_date(item) {
if (start.getUTCHours() === 0 && start.getUTCMinutes() === 0 && end.getUTCHours() === 0 && end.getUTCMinutes() === 0) {
// UTC "all-day" event
const end_day = new Date(end.valueOf() - 86400);
const end_day = new Date(end.valueOf());
const utc_start_date = fmt_date_utc.format(start);
const utc_end_day_date = fmt_date_utc.format(end_day);
if (utc_start_date === utc_end_day_date) {