Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 14 additions & 0 deletions src/locales/nb_NO/date/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This file is automatically generated.
* Run 'pnpm run generate:locales' to update.
*/
import type { DateDefinition } from '../../..';
import month from './month';
import weekday from './weekday';

const date: DateDefinition = {
month,
weekday,
};

export default date;
31 changes: 31 additions & 0 deletions src/locales/nb_NO/date/month.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Sources: https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/forkortelser/
export default {
wide: [
'april',
'august',
'desember',
'februar',
'januar',
'juli',
'juni',
'mai',
'mars',
'november',
'oktober',
'september',
],
abbr: [
'apr.',
'aug.',
'des.',
'feb.',
'jan.',
'jul.',
'juni',
'mai',
'mars',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was not able to find these abbreviations in the source you provided at the top of the file. I was able to find the following abbreviations after a while of googling tho:

Full Abbreviated (this PR) Abbreviated (what I found)
juli jul. jul. (can confirm)
juni juni jun.
mai mai mai (can confirm)
mars mars mar.

Can you provide another source for the abbreviations by chance?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Interesting. I looked further into this via the Unicode CLDR Project, and found these values:

Months - abbreviated - Formatting (https://st.unicode.org/cldr-apps/v#/no/Gregorian/header_Months_abbreviated_Formatting)

English Norwegian
Jan jan.
Feb feb.
Mar mars
Apr apr.
May mai
Jun juni
Jul juli
Aug aug.
Sep sep.
Oct okt.
Nov nov.
Dec des.

Months - abbreviated - Standalone (https://st.unicode.org/cldr-apps/v#/no/Gregorian/header_Months_abbreviated_Standalone)

English Norwegian
Jan jan
Feb feb
Mar mar
Apr apr
May mai
Jun jun
Jul jul
Aug aug
Sep sep
Oct okt
Nov nov
Dec des

The tables above seem to align with the Språkrådet's recommendation not to abbreviate mai, juni, and juni in context.

For weekdays, I decided to follow this table from the CLDR project:
Days - abbreviated - Formatting (https://st.unicode.org/cldr-apps/v#/no/Gregorian/header_Days_abbreviated_Formatting)

English Norwegian
Sun søn.
Mon man.
Tue tir.
Wed ons.
Thu tor.
Fri fre.
Sat lør.

Thoughts?

Comment on lines +37 to +40
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These don't seem to be abbreviated, which might be correct, just pointing that out.

'nov.',
'okt.',
'sep.',
],
};
13 changes: 13 additions & 0 deletions src/locales/nb_NO/date/weekday.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Sources: https://sprakradet.no/godt-og-korrekt-sprak/rettskriving-og-grammatikk/forkortelser/
export default {
wide: [
'fredag',
'lørdag',
'mandag',
'onsdag',
'søndag',
'tirsdag',
'torsdag',
],
abbr: ['fr.', 'lø.', 'ma.', 'on.', 'sø.', 'ti.', 'to.'],
};
2 changes: 2 additions & 0 deletions src/locales/nb_NO/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { LocaleDefinition } from '../..';
import color from './color';
import commerce from './commerce';
import company from './company';
import date from './date';
import internet from './internet';
import location from './location';
import metadata from './metadata';
Expand All @@ -24,6 +25,7 @@ const nb_NO: LocaleDefinition = {
color,
commerce,
company,
date,
internet,
location,
metadata,
Expand Down
Loading