Skip to content

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

@qwol

Description

@qwol

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions