diff --git a/spec/plainyearmonth.html b/spec/plainyearmonth.html index 7c32f348d2..80ef22c915 100644 --- a/spec/plainyearmonth.html +++ b/spec/plainyearmonth.html @@ -256,13 +256,15 @@

Temporal.PlainYearMonth.prototype.add ( _temporalDurationLike_ [ , _options_ 1. Set _options_ to ? GetOptionsObject(_options_). 1. Let _calendar_ be _yearMonth_.[[Calendar]]. 1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"monthCode"*, *"year"* »). + 1. Let _fields_ be ? PrepareTemporalFields(_yearMonth_, _fieldNames_, «»). 1. Let _sign_ be ! DurationSign(_duration_.[[Years]], _duration_.[[Months]], _duration_.[[Weeks]], _balanceResult_.[[Days]], 0, 0, 0, 0, 0, 0). 1. If _sign_ < 0, then 1. Let _dayFromCalendar_ be ? CalendarDaysInMonth(_calendar_, _yearMonth_). 1. Let _day_ be ? ToPositiveInteger(_dayFromCalendar_). 1. Else, 1. Let _day_ be 1. - 1. Let _date_ be ? CreateTemporalDate(_yearMonth_.[[ISOYear]], _yearMonth_.[[ISOMonth]], _day_, _calendar_). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"day"*, _day_). + 1. Let _date_ be ? DateFromFields(_calendar_, _fields_, *undefined*). 1. Let _durationToAdd_ be ! CreateTemporalDuration(_duration_.[[Years]], _duration_.[[Months]], _duration_.[[Weeks]], _balanceResult_.[[Days]], 0, 0, 0, 0, 0, 0). 1. Let _optionsCopy_ be OrdinaryObjectCreate(%Object.prototype%). 1. Let _entries_ be ? EnumerableOwnPropertyNames(_options_, ~key+value~). @@ -289,13 +291,15 @@

Temporal.PlainYearMonth.prototype.subtract ( _temporalDurationLike_ [ , _opt 1. Set _options_ to ? GetOptionsObject(_options_). 1. Let _calendar_ be _yearMonth_.[[Calendar]]. 1. Let _fieldNames_ be ? CalendarFields(_calendar_, « *"monthCode"*, *"year"* »). + 1. Let _fields_ be ? PrepareTemporalFields(_yearMonth_, _fieldNames_, «»). 1. Let _sign_ be ! DurationSign(_duration_.[[Years]], _duration_.[[Months]], _duration_.[[Weeks]], _balanceResult_.[[Days]], 0, 0, 0, 0, 0, 0). 1. If _sign_ < 0, then 1. Let _dayFromCalendar_ be ? CalendarDaysInMonth(_calendar_, _yearMonth_). 1. Let _day_ be ? ToPositiveInteger(_dayFromCalendar_). 1. Else, 1. Let _day_ be 1. - 1. Let _date_ be ? CreateTemporalDate(_yearMonth_.[[ISOYear]], _yearMonth_.[[ISOMonth]], _day_, _calendar_). + 1. Perform ! CreateDataPropertyOrThrow(_fields_, *"day"*, _day_). + 1. Let _date_ be ? DateFromFields(_calendar_, _fields_, *undefined*). 1. Let _durationToAdd_ be ! CreateTemporalDuration(_duration_.[[Years]], _duration_.[[Months]], _duration_.[[Weeks]], _balanceResult_.[[Days]], 0, 0, 0, 0, 0, 0). 1. Let _optionsCopy_ be OrdinaryObjectCreate(%Object.prototype%). 1. Let _entries_ be ? EnumerableOwnPropertyNames(_options_, ~key+value~).