Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional properties to DA locale #626

Merged
merged 1 commit into from
Jul 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/locale/da.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import dayjs from 'dayjs'
const locale = {
name: 'da',
weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
weekdaysShort: 'søn._man._tirs._ons._tors._fre._lør.'.split('_'),
weekdaysMin: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
monthsShort: 'jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.'.split('_'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, how about removing all the ending dot to keep the same with https://github.com/moment/moment/blob/develop/locale/da.js ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment!
I would argue that the dots are part of the way short versions of months are to be displayed in Danish. Similar to the way it's handled in Norwegian (Bokmål):
https://github.com/iamkun/dayjs/blob/dev/src/locale/nb.js

You can also see the format used in the Wikipedia article about date formatting in Denmark:
https://en.m.wikipedia.org/wiki/Date_and_time_notation_in_Denmark

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Wikipedia, seems not dot as well?:

lørdag, den 1. januar 2000 
tirsdag, den 25. juni 2019
lørdag 1. januar 2000 
tirsdag 25. juni 2019

Copy link
Contributor Author

@DerJacques DerJacques Jul 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the examples with full months :) I only changed the short versions that use abbreviations. From the Wikipedia article:

  1. jan. 2000 (versus 1. januar 2000)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see.

weekStart: 1,
ordinal: n => `${n}.`,
formats: {
Expand Down