Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5784253

Browse files
fix(ng/$locale): add ERA info in generic locale
This change also updates the closure i18n converter to pull in the ERA info for generated locale files.
1 parent 528cf09 commit 5784253

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

i18n/spec/closureI18nExtractorSpec.js

+2
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ describe("extractDateTimeSymbols", function() {
185185
DAY: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
186186
SHORTDAY: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
187187
AMPMS: ['AM', 'PM'],
188+
ERAS: ['av. J.-C.', 'ap. J.-C.'],
189+
ERANAMES: ['avant Jésus-Christ', 'après Jésus-Christ'],
188190
medium: 'yyyy-MM-dd HH:mm:ss',
189191
short: 'yy-MM-dd HH:mm',
190192
fullDate: 'EEEE d MMMM y',

i18n/src/converter.js

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ function convertDatetimeData(dataObj) {
4242
datetimeFormats.DAY = dataObj.WEEKDAYS;
4343
datetimeFormats.SHORTDAY = dataObj.SHORTWEEKDAYS;
4444
datetimeFormats.AMPMS = dataObj.AMPMS;
45+
datetimeFormats.ERAS = dataObj.ERAS;
46+
datetimeFormats.ERANAMES = dataObj.ERANAMES;
4547

4648

4749
datetimeFormats.medium = dataObj.DATEFORMATS[2] + ' ' + dataObj.TIMEFORMATS[2];

src/ng/locale.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ function $LocaleProvider() {
5959
mediumDate: 'MMM d, y',
6060
shortDate: 'M/d/yy',
6161
mediumTime: 'h:mm:ss a',
62-
shortTime: 'h:mm a'
62+
shortTime: 'h:mm a',
63+
ERANAMES: [
64+
"Before Christ",
65+
"Anno Domini"
66+
],
67+
ERAS: [
68+
"BC",
69+
"AD"
70+
]
6371
},
6472

6573
pluralCat: function(num) {

0 commit comments

Comments
 (0)