Skip to content

Commit ecbf2f4

Browse files
committed
Fix pluralization in overdue message for describeDeadline function
1 parent ab1448e commit ecbf2f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Sprint-3/todo-list/todos.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function describeDeadline(deadline, today = new Date()) {
6767
const days = daysLeft(deadline, today);
6868

6969
if (Number.isNaN(days)) return "Invalid date";
70-
if (days < 0) return `Overdue by ${-days} days${days === -1 ? "" : "s"}`;
70+
if (days < 0) return `Overdue by ${-days} day${days === -1 ? "" : "s"}`;
7171
if (days === 0) return "Due today";
7272
if (days === 1) return "Due tomorrow";
7373

0 commit comments

Comments
 (0)