iamkun / iamkun/dayjs

Dayjs locales are very limited compared to MomentJS

Open
#1,068 5 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**
Not a bug but a feature request. The day.js locales only have a small subset of the data compared to MomentJS. This can result in unexpected behaviour when migrating from MomentJS to day.js.

For example, consider the `de` translations for [day.js](https://github.com/iamkun/dayjs/blob/dev/src/locale/de.js) and [MomentJS](https://github.com/moment/moment/blob/develop/src/locale/de.js). MomentJS has calendar values. This makes it possible to output things like "Tomorrow at 12:30pm".

**Expected behavior**
Day.js should provide the same locale data as MomentJS.

**Information**
- Day.js Version: 1.8.36
- OS: MacOS Catalina
- Browser: FireFox
- Time zone: EST

Contributor guide

Open the contributing guide

Research direction

Start by comparing src/locale/de.js with the linked MomentJS de.js locale file, focusing on missing calendar values and other locale data. Determine whether the expected parity applies to German only or to all Day.js locales; done means the requested locale data is available and the migration behavior matches the corresponding MomentJS data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
localization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.