Commit 7f483440 authored by Eastern Li's avatar Eastern Li Committed by Claudio Cambra
Browse files

Fix function `todoDateTimeLabel`

Fix function `todoDateTimeLabel`, in which today's uncompleted non-all-day tasks are incorrectly marked as overdue or not.

before:
![before](/uploads/fc6760072474efa7f42520f15beaedc3/Screenshot_20220604_170835.png)
after:
![after](/uploads/c5c656096df72b5adf4e7cf4282a809a/after.png)
parent 1a40ca3c
Pipeline #185388 passed with stage
in 5 minutes and 42 seconds
......@@ -215,7 +215,7 @@ function todoDateTimeLabel(datetime, allDay, completed) {
i18nc("%1 is the time, spaces included to allow use of 'empty' string when an event is allday and has no time", " at %1 ", datetime.toLocaleTimeString(Qt.locale(), 1));
if(DateUtils.sameDay(datetime, now)) {
return (datetime > now) && !completed && !allDay ?
return (datetime < now) && !completed && !allDay ?
i18nc("No space since the %1 string, which includes the time (or not), includes this space", "Today%1(overdue)", timeString) :
i18nc("No space since the %1 string, which includes the time (or not), includes this space", "Today%1", timeString);
} else if(DateUtils.sameDay(DateUtils.addDaysToDate(datetime, - 1), now)) { // Tomorrow
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment