--back <clock time> fails silently when time is on the previous calendar day
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
1. It is 12:42am on April 25
2. Run: `doing done "some entry" --back 2:30pm --section Home`
3. 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.
2 条评论