iamkun / iamkun/dayjs

Format of 'dd' template is wrong in ru localization

Open
#2,424 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**
In RU localization this code returns false result
```
const _d = dayjs('2023-08-21');
console.log(_d.format('dd'));
```
Logs **вт** which means tuesday.

**Expected behavior**
Expected to be **пн** - monday.

For EN localization the result will be as expected - monday.

**Information**
- Day.js Version [e.g. v1.11.7]

Contributor guide

Open the contributing guide

Research direction

Start by tracing Day.js's Russian localization and the `dd` format entry point using the provided example. The fix is complete when formatting `2023-08-21` with `dd` under the Russian locale returns `пн` rather than `вт`, with a regression check for this behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
localization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.