--back <clock time> fails silently when time is on the previous calendar day
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.3k
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the doing done command and reproduce the failure using --back 2:30pm just after midnight. Trace how the clock time is resolved across the calendar-day boundary, then verify that it selects the previous day or reports a clear actionable error instead of the NilClass conversion message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100