iamkun / iamkun/dayjs

Incorrect ordinals translation in French for dayjs npm package

Open
#2,679 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
48.7k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
There appears to be an issue with the ordinals translation in the French language for the dayjs npm package. The expected translation for ordinals in French is not happening correctly. Additionally, similar issues might exist for other languages. Here are the details:

Steps to Reproduce:

  • Set the locale to French (fr).
  • Add advancedFormat plugin
  • Attempt to format a date using the ordinals feature.

Example Code:
dayjs('2024-06-17').format('Do MMMM YYYY')

Expected Behavior:
The output should include the correct ordinal suffix in French, such as 17e juin 2024.

Actual Behavior:
The output does not include the correct ordinal suffix and appears as 17 juin 2024.

Information

  • Day.js Version [e.g. v1.10.7]
  • OS: Microsoft Windows 11 Pro
  • Chrome Version 125.0.6422.142

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example with the French locale and advancedFormat plugin, then trace the French locale and ordinal-formatting entry points. Compare the current output with the expected “17e juin 2024” result and check whether the same behavior occurs in other locales; done means the French ordinal output is correct and covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
internationalization
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.