You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--back <clock time> fails silently when time is on the previous calendar day #191
When using doing done past midnight with a --back time that refers to the previous calendar day, the command fails with an unhelpful error:
error: can't convert NilClass into an exact number
Steps to reproduce
It is 12:42am on April 25
Run: doing done "some entry" --back 2:30pm --section Home
Result: error: can't convert NilClass into an exact number
Expected behavior
--back 2:30pm at 12:42am should resolve to 2:30pm on April 24 — the most recent past occurrence of that clock time. Passing a time that is in the future on the current calendar day unambiguously means "yesterday at that time."
Workaround
Using a duration instead of a clock time works correctly:
doing done "some entry" --back 612m --section Home
Additional context
The error message gives no hint that the issue is a day-boundary ambiguity. "Can't convert NilClass into an exact number" reads like an internal null reference rather than a user-fixable input problem. Even if the "assume previous day" behavior isn't implemented, a clearer error like "time is in the future — did you mean yesterday?" would help.
I had it hardcoded to always literally add "today" to date strings without a date (just a time). It makes sense to test for future times and assume the previous day, so I'm going to code that in. Thanks for the report.
Activity
ttscoff commentedon Apr 25, 2026
Fix --back clock times after midnight
kscott commentedon Apr 28, 2026
I did find that explicitly saying "Yesterday 7:30pm" when running after midnight does work