C0: blumeops-tasks — replace ambiguous due:+N with "Nd overdue"

The signed offset format read as "due in 5 days" rather than
"5 days overdue", causing misreads. Switch to self-explanatory
text: "5d overdue" / "due in 2d" / "due today".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-04-27 11:49:46 -07:00
commit c9eb188e05
2 changed files with 7 additions and 2 deletions

View file

@ -1 +1 @@
`blumeops-tasks` now annotates each task with a signed `due:±N` offset (or `due:today`) and a `↻ <recurrence>` marker for recurring tasks, and sorts by overdue-ness (most overdue first, no-due-date last) with priority as tiebreaker. `blumeops-tasks` now annotates each task with a human-readable due offset (`5d overdue` / `due in 2d` / `due today`) and a `↻ <recurrence>` marker for recurring tasks, and sorts by overdue-ness (most overdue first, no-due-date last) with priority as tiebreaker.

View file

@ -189,7 +189,12 @@ def main() -> int:
meta = [] meta = []
days = days_until_due(task) days = days_until_due(task)
if days is not None: if days is not None:
meta.append(f"due:{days:+d}" if days != 0 else "due:today") if days == 0:
meta.append("due today")
elif days > 0:
meta.append(f"{days}d overdue")
else:
meta.append(f"due in {-days}d")
recurrence = recurrence_string(task) recurrence = recurrence_string(task)
if recurrence: if recurrence:
meta.append(f"↻ {recurrence}") meta.append(f"↻ {recurrence}")