Skip to content

[13.x] Fix number abbreviation rollover between unit tiers#59692

Merged
taylorotwell merged 2 commits intolaravel:13.xfrom
Button99:13.x
Apr 14, 2026
Merged

[13.x] Fix number abbreviation rollover between unit tiers#59692
taylorotwell merged 2 commits intolaravel:13.xfrom
Button99:13.x

Conversation

@Button99
Copy link
Copy Markdown
Contributor

This PR fixes Number::abbreviate() and Number::forHumans() when a value rounds up across a unit boundary.

Before the change, values like 999500 were formatted as 1,000K instead of 1M, the same thing affected higher tiers.

e.g.

Before:
  - `Number::abbreviate(999500)` → `1,000K`
  - `Number::forHumans(999500)` → `1,000 thousand`

  After:
  - `Number::abbreviate(999500)` → `1M`
  - `Number::forHumans(999500)` → `1 million`

@taylorotwell taylorotwell merged commit 06c16ea into laravel:13.x Apr 14, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants