iamkun / iamkun/dayjs

Calendar Time Locales for past tense

Open
#1,613 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

Hi,
In Romanian language, and maybe others too when you say Last Monday or other past tense days, Monday is written different... can i overwrite those locales only for the Calendar plugin?
Ex: Monday is "Luni" but when you say Last Monday it is "Lunea" (Trecuta)
and when i use the Calendar Time to display time to a past date i can only show the date, i can't use the 'dddd' variable.
```
db.day(t.limita).calendar(null, {
sameDay: '[Astazi]', // The same day ( Today at 2:30 AM )
nextDay: '[Maine]', // The next day ( Tomorrow at 2:30 AM )
nextWeek: 'dddd', // The next week ( Sunday at 2:30 AM )
lastDay: '[Ieri]', // The day before ( Yesterday at 2:30 AM )
lastWeek: 'dddd [trecuta]', // Last week ( Last Monday at 2:30 AM )
sameElse: 'D MMM', // Everything else ( 7/10/2011 )
}),
```

lastWeek: 'dddd [trecuta]', is wrong ... it gives me "Luni trecuta" and should be "Lunea trecuta"
this is true for most days of the week.
Any way to solve this?
Thanks

Contributor guide

Open the contributing guide

Research direction

Start by reading the Calendar plugin entry point and the Romanian locale handling; trace how lastWeek applies the dddd token and whether past dates permit it. Compare the current output with the requested “Lunea trecuta” wording, then add focused coverage for the reported configuration and confirm sameElse behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
localization
Issue type
Bug
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.