Add a grace period for expiring events in the past

This commit is contained in:
Dan Paulat 2023-05-29 01:20:31 -05:00
parent bc21d7bf02
commit 6d165068e9

View file

@ -156,8 +156,9 @@ TextProductMessage::segment_event_begin(std::size_t s) const
hours {beginHour} + minutes {beginMinute};
// If the begin date is after the end date, assume the start time
// was the previous month
if (eventBegin > eventEnd)
// was the previous month (give a 1 day grace period for expiring
// events in the past)
if (eventBegin > eventEnd + 24h)
{
// If the current end month is January
if (endDate.month() == January)