arrow-py / arrow-py/arrow

Strange `humanize` intervals

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

Description

## Issue Description

It seems that the intervals being used for the various thresholds for `humanize` are a bit strange. For example, on one of my websites, I have a list of upcoming events with both the calendar date and a `humanize`d description. As of today, January 9 2026, there are two events, one on January 24 which appears as "in two weeks" and one on January 25 which appears as "in a month."

15 days (the 24th) is indeed about two weeks away, but 16 days (the 25th) is certainly not a month away - if anything it's also closest to around two weeks away. It isn't even closer to three weeks than two, less alone a month.

## System Info

- 🖥 **OS name and version**: Linux (Ubuntu 24.04 LTS if that matters)
- 🐍 **Python version**: 3.12.3
- 🏹 **Arrow version**: 1.4.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the humanize entry point and inspect the interval-threshold behavior; search the existing humanize tests for boundary cases around 15–16 days. Reproduce the January 24/25 example on Python 3.12.3, then add or adjust a regression test so nearby dates produce an appropriate, consistent interval.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.