Skip to content

Commit

Permalink
Merge branch 'master' of github.com:andyearnshaw/Intl.js
Browse files Browse the repository at this point in the history
  • Loading branch information
caridy committed Apr 25, 2016
2 parents 0958d46 + 0b4a3b6 commit 1aae5bb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/12.datetimeformat.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ function CreateDateTimeParts(dateTimeFormat, x) {
fv = resolveDateString(localeData, ca, 'dayPeriods', v > 11 ? 'pm' : 'am');
// iv.
arrPush.call(result, {
type: 'dayperiod',
type: 'dayPeriod',
value: fv,
});
// g.
Expand Down
22 changes: 22 additions & 0 deletions src/8.intl.js
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
import {
defineProperty,
} from "./util.js";

import {
CanonicalizeLocaleList
} from "./9.negotiation.js";

export const Intl = {};

function GetCanonicalLocales (locales) {
let codes = CanonicalizeLocaleList(locales);
let result = [];
for (let code in codes) {
result.push(codes[code]);
}
return result;
}

defineProperty(Intl, 'getCanonicalLocales', {
configurable: true,
value: GetCanonicalLocales,
});

0 comments on commit 1aae5bb

Please sign in to comment.