CmdCalendar: Default to current month if no due date is present

Previously, if no due date was set on any pending/waiting task, the
calendar output would start at the end of the currently supported date
period.

Default to current month instead.
This commit is contained in:
Tomas Babej 2021-01-24 04:19:45 -05:00
parent 0234cd8122
commit 2df80aac01

View file

@ -187,8 +187,12 @@ int CmdCalendar::execute (std::string& output)
}
}
}
mFrom = oldest.month();
yFrom = oldest.year();
// Default to current month if no due date is present
if (oldest != Datetime (9999, 12, 31)) {
mFrom = oldest.month();
yFrom = oldest.year();
}
}
if (Context::getContext ().config.getBoolean ("calendar.offset"))