···1919 9. Return CreateArrayFromList( list ).
20202121 AvailableCalendars ( )
2222- The implementation-defined abstract operation AvailableCalendars takes no arguments and returns a List of calendar types. The returned List is sorted according to lexicographic code unit order, and contains unique calendar types in canonical form (6.9) identifying the calendars for which the implementation provides the functionality of Intl.DateTimeFormat objects, including their aliases (e.g., both of "islamicc" and "islamic-civil"). The List must include the Calendar Type value of every row of Table 1, except the header row.
2323-locale: [en]
2222+ The implementation-defined abstract operation AvailableCalendars takes no arguments and returns
2323+ a List of calendar types. The returned List is sorted according to lexicographic code unit order,
2424+ and contains unique calendar types in canonical form (6.9) identifying the calendars for which
2525+ the implementation provides the functionality of Intl.DateTimeFormat objects, including their
2626+ aliases (e.g., both "islamicc" and "islamic-civil"). The List must consist
2727+ of the Calendar Type value of every row of Table 1, except the header row.
2428features: [Intl-enumeration, Intl.Era-monthcode]
2529---*/
2630···3135 "dangi",
3236 "ethioaa",
3337 "ethiopic",
3838+ // "ethiopic-amete-alem", // Alias for "ethioaa".
3439 "gregory",
3540 "hebrew",
3641 "indian",
3742 "islamic-civil",
3843 "islamic-tbla",
3944 "islamic-umalqura",
4545+ // "islamicc", // Alias for "islamic-civil".
4046 "iso8601",
4147 "japanese",
4248 "persian",
4349 "roc"
4444-]
5050+];
5151+5252+assert.compareArray(
5353+ requiredCalendars,
5454+ requiredCalendars.slice(0).sort(),
5555+ "requiredCalendars is sorted"
5656+);
45574658const supportedCalendars = Intl.supportedValuesOf("calendar");
4747-for (const calendar of requiredCalendars) {
4848- assert(supportedCalendars.includes(calendar), "Required calendar: " + calendar + " must be supported");
4949-}
5959+6060+assert.compareArray(
6161+ supportedCalendars,
6262+ requiredCalendars,
6363+ "only the required calendars are supported"
6464+);