+ ToLocalTime ( _t_, _calendar_, _timeZone_ )
[[Month]] |
`MonthFromTime(tz)` specified in ES2023's Month Number
@@ -2172,7 +2165,7 @@ Temporal.Calendar.prototype.daysInYear ( _temporalDateLike_ )
1. If Type(_temporalDateLike_) is not Object or _temporalDateLike_ does not have an [[InitializedTemporalDate]], [[InitializedTemporalDateTime]], or [[InitializedTemporalYearMonth]] internal slot, then
1. Set _temporalDateLike_ to ? ToTemporalDate(_temporalDateLike_).
1. If _calendar_.[[Identifier]] is *"iso8601"*, then
- 1. Return DaysInYear(𝔽(_temporalDateLike_.[[ISOYear]])).
+ 1. Return 𝔽(MathematicalDaysInYear(_temporalDateLike_.[[ISOYear]])).
1. Let _daysInYear_ be ! CalendarDateDaysInYear(_calendar_.[[Identifier]], _temporalDateLike_).
1. Return 𝔽(_daysInYear_).
@@ -2209,7 +2202,7 @@ Temporal.Calendar.prototype.inLeapYear ( _temporalDateLike_ )
1. If Type(_temporalDateLike_) is not Object or _temporalDateLike_ does not have an [[InitializedTemporalDate]], [[InitializedTemporalDateTime]], or [[InitializedTemporalYearMonth]] internal slot, then
1. Set _temporalDateLike_ to ? ToTemporalDate(_temporalDateLike_).
1. If _calendar_.[[Identifier]] is *"iso8601"*, then
- 1. If InLeapYear(TimeFromYear(𝔽(_temporalDateLike_.[[ISOYear]]))) is *1*𝔽, then
+ 1. If MathematicalInLeapYear(EpochTimeForYear(_temporalDateLike_.[[ISOYear]])) is 1, then
1. Let _inLeapYear_ be *true*.
1. Else,
1. Let _inLeapYear_ be *false*.
diff --git a/spec/plaindate.html b/spec/plaindate.html
index d5845b0e89..66b2671c3d 100644
--- a/spec/plaindate.html
+++ b/spec/plaindate.html
@@ -809,11 +809,9 @@
1. Return ! CreateDateDurationRecord(_years_, _months_, 0, _days_).
1. Else,
1. Assert: _largestUnit_ is *"day"* or *"week"*.
- 1. Let _epochDays1_ be MakeDay(𝔽(_y1_), 𝔽(_m1_ - 1), 𝔽(_d1_)).
- 1. Assert: _epochDays1_ is finite.
- 1. Let _epochDays2_ be MakeDay(𝔽(_y2_), 𝔽(_m2_ - 1), 𝔽(_d2_)).
- 1. Assert: _epochDays2_ is finite.
- 1. Let _days_ be ℝ(_epochDays2_) - ℝ(_epochDays1_).
+ 1. Let _epochDays1_ be ISODateToEpochDays(_y1_, _m1_ - 1, _d1_).
+ 1. Let _epochDays2_ be ISODateToEpochDays(_y2_, _m2_ - 1, _d2_).
+ 1. Let _days_ be _epochDays2_ - _epochDays1_.
1. Let _weeks_ be 0.
1. If _largestUnit_ is *"week"*, then
1. Set _weeks_ to truncate(_days_ / 7).
@@ -891,10 +889,9 @@ BalanceISODate (
- 1. Let _epochDays_ be MakeDay(𝔽(_year_), 𝔽(_month_ - 1), 𝔽(_day_)).
- 1. Assert: _epochDays_ is finite.
- 1. Let _ms_ be MakeDate(_epochDays_, *+0*𝔽).
- 1. Return CreateISODateRecord(ℝ(YearFromTime(_ms_)), ℝ(MonthFromTime(_ms_)) + 1, ℝ(DateFromTime(_ms_))).
+ 1. Let _epochDays_ be ISODateToEpochDays(_year_, _month_ - 1, _day_).
+ 1. Let _ms_ be EpochDaysToEpochMs(_epochDays_, 0).
+ 1. Return CreateISODateRecord(EpochTimeToEpochYear(_ms_), EpochTimeToMonthInYear(_ms_) + 1, EpochTimeToDate(_ms_)).
diff --git a/spec/timezone.html b/spec/timezone.html
index 2d8f948799..fb700b5022 100644
--- a/spec/timezone.html
+++ b/spec/timezone.html
@@ -420,9 +420,9 @@
1. Assert: ! IsValidEpochNanoseconds(ℤ(_epochNanoseconds_)) is *true*.
1. Let _remainderNs_ be _epochNanoseconds_ modulo 106.
1. Let _epochMilliseconds_ be 𝔽((_epochNanoseconds_ - _remainderNs_) / 106).
- 1. Let _year_ be ℝ(! YearFromTime(_epochMilliseconds_)).
- 1. Let _month_ be ℝ(! MonthFromTime(_epochMilliseconds_)) + 1.
- 1. Let _day_ be ℝ(! DateFromTime(_epochMilliseconds_)).
+ 1. Let _year_ be ! EpochTimeToEpochYear(_epochMilliseconds_).
+ 1. Let _month_ be ! EpochTimeToMonthInYear(_epochMilliseconds_) + 1.
+ 1. Let _day_ be ! EpochTimeToDate(_epochMilliseconds_).
1. Let _hour_ be ℝ(! HourFromTime(_epochMilliseconds_)).
1. Let _minute_ be ℝ(! MinFromTime(_epochMilliseconds_)).
1. Let _second_ be ℝ(! SecFromTime(_epochMilliseconds_)).
|