diff --git a/docs/plaindate.md b/docs/plaindate.md index 82750170b1..2d9f7e6c51 100644 --- a/docs/plaindate.md +++ b/docs/plaindate.md @@ -813,13 +813,6 @@ date.toPlainYearMonth(); // => 2006-08 date.toPlainMonthDay(); // => 08-24 ``` -### date.**getCalendar**(): object - -**Returns:** a `Temporal.Calendar` instance or plain object representing the calendar in which `date` is reckoned. - -This method is mainly useful if you need an object on which to call calendar methods. -Most code will not need to use it. - ### date.**getISOFields**(): { isoYear: number, isoMonth: number, isoDay: number, calendar: string | object } **Returns:** a plain object with properties expressing `date` in the ISO 8601 calendar, as well as the calendar (usually a string, but may be an object) in which `date` is reckoned. diff --git a/docs/plaindatetime.md b/docs/plaindatetime.md index 81bc848558..645b9e1d7f 100644 --- a/docs/plaindatetime.md +++ b/docs/plaindatetime.md @@ -1005,13 +1005,6 @@ dt.toPlainDate().toPlainYearMonth(); // => 1995-12 dt.toPlainDate().toPlainMonthDay(); // => 12-07 ``` -### datetime.**getCalendar**(): object - -**Returns:** a `Temporal.Calendar` instance or plain object representing the calendar in which `datetime` is reckoned. - -This method is mainly useful if you need an object on which to call calendar methods. -Most code will not need to use it. - ### datetime.**getISOFields**(): { isoYear: number, isoMonth: number, isoDay: number, isoHour: number, isoMinute: number, isoSecond: number, isoMillisecond: number, isoMicrosecond: number, isoNanosecond: number, calendar: string | object } **Returns:** a plain object with properties expressing `datetime` in the ISO 8601 calendar, as well as the calendar (usually a string, but may be an object) in which `datetime` is reckoned. diff --git a/docs/plainmonthday.md b/docs/plainmonthday.md index c24a642539..5c7b86a5bb 100644 --- a/docs/plainmonthday.md +++ b/docs/plainmonthday.md @@ -390,13 +390,6 @@ md = Temporal.PlainMonthDay.from({ date = md.toPlainDate({ era: 'reiwa', eraYear: 2 }); // => 2020-01-01[u-ca=japanese] ``` -### monthDay.**getCalendar**(): object - -**Returns:** a `Temporal.Calendar` instance or plain object representing the calendar in which `monthDay` is reckoned. - -This method is mainly useful if you need an object on which to call calendar methods. -Most code will not need to use it. - ### monthDay.**getISOFields**(): { isoYear: number, isoMonth: number, isoDay: number, calendar: string | object } **Returns:** a plain object with properties expressing `monthDay` in the ISO 8601 calendar, as well as the calendar (usually a string, but may be an object) in which `monthDay` is reckoned. diff --git a/docs/plainyearmonth.md b/docs/plainyearmonth.md index b6d40e19c9..0fd2a104c9 100644 --- a/docs/plainyearmonth.md +++ b/docs/plainyearmonth.md @@ -642,13 +642,6 @@ ym = Temporal.PlainYearMonth.from('2019-06'); ym.toPlainDate({ day: 24 }); // => 2019-06-24 ``` -### yearMonth.**getCalendar**(): object - -**Returns:** a `Temporal.Calendar` instance or plain object representing the calendar in which `yearMonth` is reckoned. - -This method is mainly useful if you need an object on which to call calendar methods. -Most code will not need to use it. - ### yearMonth.**getISOFields**(): { isoYear: number, isoMonth: number, isoDay: number, calendar: string | object } **Returns:** a plain object with properties expressing `yearMonth` in the ISO 8601 calendar, as well as the calendar (usually a string, but may be an object) that `yearMonth` is reckoned in. diff --git a/docs/zoneddatetime.md b/docs/zoneddatetime.md index d4455fad5e..2c3277b78b 100644 --- a/docs/zoneddatetime.md +++ b/docs/zoneddatetime.md @@ -1410,20 +1410,6 @@ zdt.toPlainDate().toPlainYearMonth(); // => 1995-12 zdt.toPlainDate().toPlainMonthDay(); // => 12-07 ``` -### zonedDateTime.**getCalendar**(): object - -**Returns:** a `Temporal.Calendar` instance or plain object representing the calendar in which `zonedDateTime` is reckoned. - -This method is mainly useful if you need an object on which to call calendar methods. -Most code will not need to use it. - -### zonedDateTime.**getTimeZone**(): object - -**Returns:** a `Temporal.TimeZone` instance or plain object representing the time zone in which `zonedDateTime` is reckoned. - -This method is mainly useful if you need an object on which to call time zone methods. -Most code will not need to use it. - ### zonedDateTime.**getISOFields**(): { isoYear: number, isoMonth: number, isoDay: number, hour: number, minute: number, second: number, millisecond: number, microsecond: number, nanosecond: number, offset: string, timeZone: string | object, calendar: string | object } **Returns:** a plain object with properties expressing `zonedDateTime` in the ISO 8601 calendar, including all date/time fields as well as the `offset` property, and the calendar and time zone (which are usually strings, but may be objects) in which `zonedDateTime` is reckoned. diff --git a/polyfill/index.d.ts b/polyfill/index.d.ts index 5bf578aeb8..a30a932528 100644 --- a/polyfill/index.d.ts +++ b/polyfill/index.d.ts @@ -812,7 +812,6 @@ export namespace Temporal { readonly monthCode: string; readonly day: number; readonly calendarId: string; - getCalendar(): CalendarProtocol; readonly dayOfWeek: number; readonly dayOfYear: number; readonly weekOfYear: number | undefined; @@ -928,7 +927,6 @@ export namespace Temporal { readonly microsecond: number; readonly nanosecond: number; readonly calendarId: string; - getCalendar(): CalendarProtocol; readonly dayOfWeek: number; readonly dayOfYear: number; readonly weekOfYear: number | undefined; @@ -999,7 +997,6 @@ export namespace Temporal { readonly monthCode: string; readonly day: number; readonly calendarId: string; - getCalendar(): CalendarProtocol; equals(other: Temporal.PlainMonthDay | PlainMonthDayLike | string): boolean; with(monthDayLike: PlainMonthDayLike, options?: AssignmentOptions): Temporal.PlainMonthDay; toPlainDate(year: { year: number }): Temporal.PlainDate; @@ -1173,7 +1170,6 @@ export namespace Temporal { readonly month: number; readonly monthCode: string; readonly calendarId: string; - getCalendar(): CalendarProtocol; readonly daysInMonth: number; readonly daysInYear: number; readonly monthsInYear: number; @@ -1258,9 +1254,7 @@ export namespace Temporal { readonly microsecond: number; readonly nanosecond: number; readonly timeZoneId: string; - getTimeZone(): TimeZoneProtocol; readonly calendarId: string; - getCalendar(): CalendarProtocol; readonly dayOfWeek: number; readonly dayOfYear: number; readonly weekOfYear: number | undefined; diff --git a/polyfill/lib/plaindate.mjs b/polyfill/lib/plaindate.mjs index 7896d3875c..b9624b5040 100644 --- a/polyfill/lib/plaindate.mjs +++ b/polyfill/lib/plaindate.mjs @@ -243,10 +243,6 @@ export class PlainDate { isoYear: GetSlot(this, ISO_YEAR) }; } - getCalendar() { - if (!ES.IsTemporalDate(this)) throw new TypeError('invalid receiver'); - return ES.ToTemporalCalendarObject(GetSlot(this, CALENDAR)); - } static from(item, options = undefined) { options = ES.GetOptionsObject(options); diff --git a/polyfill/lib/plaindatetime.mjs b/polyfill/lib/plaindatetime.mjs index f50f3ea62f..4e8125089a 100644 --- a/polyfill/lib/plaindatetime.mjs +++ b/polyfill/lib/plaindatetime.mjs @@ -398,10 +398,6 @@ export class PlainDateTime { isoYear: GetSlot(this, ISO_YEAR) }; } - getCalendar() { - if (!ES.IsTemporalDateTime(this)) throw new TypeError('invalid receiver'); - return ES.ToTemporalCalendarObject(GetSlot(this, CALENDAR)); - } static from(item, options = undefined) { options = ES.GetOptionsObject(options); diff --git a/polyfill/lib/plainmonthday.mjs b/polyfill/lib/plainmonthday.mjs index 0d8ff1a8b1..70a4471bbe 100644 --- a/polyfill/lib/plainmonthday.mjs +++ b/polyfill/lib/plainmonthday.mjs @@ -108,10 +108,6 @@ export class PlainMonthDay { isoYear: GetSlot(this, ISO_YEAR) }; } - getCalendar() { - if (!ES.IsTemporalMonthDay(this)) throw new TypeError('invalid receiver'); - return ES.ToTemporalCalendarObject(GetSlot(this, CALENDAR)); - } static from(item, options = undefined) { options = ES.GetOptionsObject(options); diff --git a/polyfill/lib/plainyearmonth.mjs b/polyfill/lib/plainyearmonth.mjs index f1dc661ed8..ed9d163c22 100644 --- a/polyfill/lib/plainyearmonth.mjs +++ b/polyfill/lib/plainyearmonth.mjs @@ -148,10 +148,6 @@ export class PlainYearMonth { isoYear: GetSlot(this, ISO_YEAR) }; } - getCalendar() { - if (!ES.IsTemporalYearMonth(this)) throw new TypeError('invalid receiver'); - return ES.ToTemporalCalendarObject(GetSlot(this, CALENDAR)); - } static from(item, options = undefined) { options = ES.GetOptionsObject(options); diff --git a/polyfill/lib/zoneddatetime.mjs b/polyfill/lib/zoneddatetime.mjs index 04a3596ca4..b22c82d80b 100644 --- a/polyfill/lib/zoneddatetime.mjs +++ b/polyfill/lib/zoneddatetime.mjs @@ -605,14 +605,6 @@ export class ZonedDateTime { timeZone: timeZoneRec.receiver }; } - getCalendar() { - if (!ES.IsTemporalZonedDateTime(this)) throw new TypeError('invalid receiver'); - return ES.ToTemporalCalendarObject(GetSlot(this, CALENDAR)); - } - getTimeZone() { - if (!ES.IsTemporalZonedDateTime(this)) throw new TypeError('invalid receiver'); - return ES.ToTemporalTimeZoneObject(GetSlot(this, TIME_ZONE)); - } static from(item, options = undefined) { options = ES.GetOptionsObject(options); diff --git a/spec/plaindate.html b/spec/plaindate.html index c77b9aa9f6..db410f31b2 100644 --- a/spec/plaindate.html +++ b/spec/plaindate.html @@ -387,18 +387,6 @@
- This method performs the following steps when called: -
-diff --git a/spec/plaindatetime.html b/spec/plaindatetime.html index 4436d8248b..73e5cb47a8 100644 --- a/spec/plaindatetime.html +++ b/spec/plaindatetime.html @@ -706,18 +706,6 @@
- This method performs the following steps when called: -
-- This method performs the following steps when called: -
-- This method performs the following steps when called: -
-- This method performs the following steps when called: -
-- This method performs the following steps when called: -
-