arrow-py / arrow-py/arrow

Humanize more human version

Open
#1,125 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
9.1k
Forks
784
PR merge metrics
No merged PRs in 30d

Description

Increased ability to convert to yesterday instead of 1 day ago, or tomorrow instead of in 1 day.
For example :
```

present = arrow.now() # september 29th (thursday)
past = present.shift(day=1)
present.humanize(past) # Tomorrow
past = present.shift(day=0)
present.humanize(past) # Just Now, if have second become 10 second ago etc... using existing arrow humanize function
past = present.shift(day=-1)
present.humanize(past) # Yesterday
past = present.shift(day=-2)
present.humanize(past) # Tuesday (only get days of week)
past = present.shift(day=-3)
present.humanize(past) # Monday
past = present.shift(day=-4)
present.humanize(past) # Sunday
past = present.shift(day=-5)
present.humanize(past) # Saturday
past = present.shift(day=-6)
present.humanize(past) # Friday
past = present.shift(day=-7)
present.humanize(past) # Last Week
past = present.shift(day=-8)
present.humanize(past) # september 21th (just get date, or use existing arrow humanize function)

```
I got inspiration from whatsapp app

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Arrow's existing humanize function and compare its current behavior with the examples in the issue. Define how day offsets map to Tomorrow, Just Now, Yesterday, weekday names, Last Week, and dates, then verify each case with focused humanize tests.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.