iamkun / iamkun/dayjs

Arabic locale (ar) uses unnecessary Right-to-Left Mark (U+200F) in format L, causing incorrect date rendering

Open
#2,977 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

**Description:**

In the Arabic locale (ar), the L date format includes Right-to-Left Mark characters (RLM, U+200F). These characters are intended to control text direction, but in Arabic typography, numbers and dates are written left-to-right and should not have their direction altered.

Including RLM in the format produces several problems:

- The RLM characters are unnecessary for correct Arabic formatting.
- When rendered in HTML, these hidden characters often cause the order of day, month, and year to appear incorrectly.
- This results in dates being visually reordered or misaligned depending on the surrounding text direction.

**Expected behavior:**
The Arabic locale format L should not contain RLM characters. Dates should display naturally without forcing direction changes.

**Example:**
Current L format (simplified):

`"D[U+200F]/M[U+200F]/YYYY"`

Suggested correction:

`"D/M/YYYY"`

**Environment:**
- Day.js Version: v1.11.13

Contributor guide

Open the contributing guide

Research direction

Locate the Arabic (ar) locale definition and inspect its L date format for U+200F characters. Check the existing locale or date-format tests, if present, and verify that the resulting format is D/M/YYYY without direction marks and renders dates in the expected order.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
localization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.