Merged PR 2285: tweak to live link
tweak to live link Related work items: #22423
This commit is contained in:
@@ -6,9 +6,15 @@ export function isEventLiveNow(item) {
|
||||
|
||||
if (isNaN(start.getTime())) return false;
|
||||
|
||||
if (item.pinswg_enddateoftheevent) {
|
||||
const end = new Date(item.pinswg_enddateoftheevent);
|
||||
const endDateValue =
|
||||
item.pinswg_enddateofevent || item.pinswg_enddateoftheevent;
|
||||
|
||||
if (endDateValue) {
|
||||
const end = new Date(endDateValue);
|
||||
if (isNaN(end.getTime())) return false;
|
||||
|
||||
end.setHours(23, 59, 59, 999);
|
||||
|
||||
return now >= start && now <= end;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user