summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Intl/DisplayNames/month-calendar.js
blob: 9a7d9abdaad9b97ddc5caf6b99ac838264d64e45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |reftest| skip-if(!this.hasOwnProperty('Intl')||!this.hasOwnProperty('addIntlExtras'))

addMozIntlDisplayNames(this);

let dn1 = new Intl.DisplayNames("en", {type: "month", calendar: "gregory"});
assertEq(dn1.of(1), "January");
assertEq(dn1.resolvedOptions().calendar, "gregory");

let dn2 = new Intl.DisplayNames("en", {type: "month", calendar: "hebrew"});
assertEq(dn2.of(1), "Tishri");
assertEq(dn2.resolvedOptions().calendar, "hebrew");

let dn3 = new Intl.DisplayNames("en", {type: "month", calendar: "islamicc"});
assertEq(dn3.of(1), "Muharram");
assertEq(dn3.resolvedOptions().calendar, "islamic-civil");

if (typeof reportCompare === "function")
  reportCompare(true, true);