Shortened time units
- Dominant language
- Python
- Stars
- 9.1k
- Forks
- 784
- PR merge metrics
- No merged PRs in 30d
Description
I originally thought this was a bug, but seeing #1150 has explained why I'm hitting that as well as the behaviour I'm getting here. Since issue suggests matching the output of humanize is the intended result, I'm calling this a feature request. Dehumanize should, ideally, support shortening minutes and seconds to mins and secs respectively.
`arrow.utcnow().dehumanize("50 mins ago")` and `arrow.utcnow().dehumanize("50 secs ago")` both result in the exception `ValueError: Input string not valid.`
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the dehumanize implementation and its related tests, then trace how it parses the existing full “minutes” and “seconds” forms. Verify that “50 mins ago” and “50 secs ago” are accepted while existing humanize output and longer unit forms remain unchanged, then run the relevant test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100