fix all-day events
This commit is contained in:
parent
b32c8e24be
commit
52fe090a53
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user