Skip to content

fix(when): send weekday names as their date and check evening@time, in add, edit and import - #458

Merged
ryanlewis merged 1 commit into
mainfrom
fix/when-weekday-evening
Oct 10, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
fix/when-weekday-evening

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

Measured in Things 3 on Saturday 10 Oct 2026: a weekday name means the next such day strictly after today (today + 1..7), and a time after it only sets the reminder. evening@T files the item This Evening, today, with a reminder at T, any time included. Until now the CLI sent both as typed and reported them "not confirmed (--when not checked)" after #453. Import refused friday@9pm and reported an unchecked when as confirmed.

What is sent

typed sent (on Sat 10 Oct) read back as
friday / Friday 2026-10-16 the date
friday@9pm 2026-10-16@21:00 date and time
saturday, saturday@9am, saturday@9pm 2026-10-17[@HH:MM] (a week on) date
sunday@9am 2026-10-11@09:00 date and time
evening@6pm / Evening@9am evening@18:00 / evening@09:00 this evening (bucket 1), today
fri, fri@9pm, next friday as typed not checked (unchanged)

This applies to add, project add, edit and import (through resolveImportWhens). A bare weekday is resolved too: Things gives friday and 2026-10-16 the same place, and the date form is the measured one. Abbreviations were not measured, so they still go as typed.

Changes

  • things.ResolveWhen resolves full weekday names (case-insensitive), alone or with a time, and normalises evening@T to evening@HH:MM. TimedWhenWord (timed keyword or weekday name) replaces TimedWhenKeyword in checkWhenShape and WhenDateOrTime. So friday@25:00 is now refused like tomorrow@25:00, and friday@9pm is no longer a free phrase (an edit of it alone is read back).
  • placeWhen and whenPlaced share one parse step (parseWhen), which also places evening@HH:MM.
  • whenCheck.verdict returns whenUnplaced, so add and import judge an unplaced value the same way. Import now reports such an item confirmed: false, reason when, with landed, as Created, not confirmed (when not checked): …, and exits 0. The reason is the same as a phrase Things did not understand. The plain-text line and landed tell them apart.
  • Import accepts a weekday name before @ (sent as its date).
  • Docs: commands.md, agents.md, SKILL.md.

The read-back does not check the reminder for evening@T, as it does not for today@6pm.

Before / after

things add "Buy oat milk" --when friday@9pm:

  • before: sent as friday@9pm, output Created, not confirmed (--when not checked): "Buy oat milk" (<uuid>) with a warning.
  • after: sent as 2026-10-16@21:00. Filed on the 16th, the item is printed (confirmed). Filed elsewhere: add did not apply as sent: … --when "friday@9pm" did not file it there: … (misfiled).

things add "Buy oat milk" --when evening@6pm: same, sent as evening@18:00, confirmed when This Evening today.

Import {"when":"fri"}, which Things understood:

  • before: Created and confirmed: …
  • after: Created, not confirmed (when not checked): [0] "Pay rent" (<uuid>), scheduled for …

Tests

TestResolveWhen (same weekday as today, past time, before midnight, abbreviations), TestWhenWeekdayEveningReadBack (clock pinned to a Saturday; add, project add and edit, landed and misfiled, URL sent), TestPlaceWhen evening cases, TestResolveImportWhens, TestImportChecksWhen (weekday misfiled, unchecked fri), and TestCheckScheduleValue. make test and make lint pass.

@ryanlewis
ryanlewis merged commit b815960 into main Oct 10, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the fix/when-weekday-evening branch October 10, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant