iamkun / iamkun/dayjs

Ordinal suffix is fine until 31

Open
#2,768 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The ordinal suffix from the `advancedFormat` plugin works fine up to `31`, where it returns `1st`.

**Expected behavior**
One using an en/en_us locale would expect to see `31st`

**Information**
- Day.js Version 1.11.13
- OS: MacOS Sequoia 15.1
- Browser: Chrome Version 130
- Time zone: GMT-05:00 EST

Screenshot 2024-11-16 at 4 56 58 PM

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the ordinal suffix behavior in the advancedFormat plugin with an en or en_us locale, focusing on the reported value 31. Confirm that the output is 31st rather than 1st, and verify the behavior against the expected ordinal formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.