Humanize should be more dynamic
- Dominant language
- Python
- Stars
- 9.1k
- Forks
- 784
- PR merge metrics
- No merged PRs in 30d
Description
## Feature Request
humanize is great, and being able to specify granularity is great, but it needs to be more dynamic. Say, for instance, we want to to specify how long ago something happened in years, months, weeks, days, hours, and seconds. However, let's say that it only happened 5 hours ago. Notice how I didn't say 0 years, 0 months, 0 weeks, 0 days, 5 hours, and 0 seconds from now. I just said 5 hours. So if a value is 0 say 0 years, months, days, seconds, etc, it doesn't include that bit in the humanized time string.
Now let's say we add 12 seconds to that 5 hours...5 hours and 12 seconds ago. Now let's say a day goes by so now the string evolves into something like 1 day, 2 hours, 3 minutes, and 2 seconds ago. And the same goes for weeks, months, so on and so on.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating Arrow's humanize entry point and its existing tests. Check how granularity and zero-valued units are currently handled, then verify that output omits zero units and evolves across seconds, minutes, hours, days, weeks, and months as described in the request.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100