diff --git a/src/datetime.ts b/src/datetime.ts index 8c35525e5..4f5c2e932 100644 --- a/src/datetime.ts +++ b/src/datetime.ts @@ -1163,14 +1163,12 @@ export default class DateTime { /** * Returns the resolved Intl options for this DateTime. * This is useful in understanding the behavior of formatting methods - * @param {Object} options - Intl.DateTimeFormat constructor options, same as `toLocaleString`. * @return {Object} */ - resolvedLocaleOptions(options: Intl.DateTimeFormatOptions = {}) { - const { locale, numberingSystem: ns, calendar } = Formatter.create( - this.loc, - options - ).resolvedOptions(this); + resolvedLocaleOptions() { + const { locale, numberingSystem: ns, calendar } = Formatter.create(this.loc).resolvedOptions( + this + ); const numberingSystem = ns as NumberingSystem; const outputCalendar = calendar as CalendarSystem; return { locale, numberingSystem, outputCalendar }; diff --git a/test/datetime/format.test.ts b/test/datetime/format.test.ts index fba2cb4d1..a2c1575f2 100644 --- a/test/datetime/format.test.ts +++ b/test/datetime/format.test.ts @@ -301,18 +301,6 @@ test("DateTime#resolvedLocaleOptions reflects changes to the locale", () => { expect(res.numberingSystem).toBe("mong"); }); -test("DateTime#resolvedLocaleOptions can override with options", () => { - const res = DateTime.now().resolvedLocaleOptions({ - locale: "be", - numberingSystem: "mong", - outputCalendar: "coptic" - }); - - expect(res.locale).toBe("be-u-ca-coptic-nu-mong"); - expect(res.outputCalendar).toBe("coptic"); - expect(res.numberingSystem).toBe("mong"); -}); - Helpers.withoutIntl("DateTime#resolvedLocaleOptions default values without intl", () => { const res = DateTime.now().resolvedLocaleOptions();