Expand description
Minimal due-date parsing and rendering.
Accepts the common forms a personal task manager needs:
today,tomorrow- weekday names:
fri,friday,next monday(next future occurrence) - relative offsets:
+3d,3d,+1w,2w(added to today) YYYY-MM-DD(ISO 8601 calendar date)MM-DD(current year implied)DD.MM(German short form, current year implied)DD.MM.YYYY(German long form)
Weekday names always resolve to the next matching day in the future,
never today (so friday on a Friday means the following Friday); the
optional next prefix is accepted as a synonym. The parser returns a
structured error for anything it does not recognise so the CLI can
surface a useful hint. See JOT-0032-69.
Rendering produces short human-readable labels for a list view, with a side-channel severity so the CLI can colorise consistently.
Structs§
Enums§
- DueSeverity
- Relative severity of a due date compared to ‘today’.
- Label
Mode - Label length mode.
Longis the default reader-friendly form (today,tomorrow,overdue 2d);Shortcompresses to the terminal-friendly abbreviations matching joy-cli short mode (tod,tmw,-2d). Weekday and month-day renderings are the same in both modes because%aand%b %-dare already compact.
Functions§
- parse_
due - Parse a
--dueargument against a reference ‘today’ date. - render_
due - Render a due date as a label. Returns
(label, severity)so the CLI can apply colors consistently.