From 66d2cc7e72f4de2b97f4ca4e34b051c393958080 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 21 Nov 2024 12:35:43 -0500 Subject: [PATCH 1/2] Fix typo in DifferenceTemporalPlainYearMonth AO If we use `yearMonth` here, we end up comparing the same dates. --- spec/plainyearmonth.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/plainyearmonth.html b/spec/plainyearmonth.html index 8a602cac7..ee35413d8 100644 --- a/spec/plainyearmonth.html +++ b/spec/plainyearmonth.html @@ -605,7 +605,7 @@

1. Let _thisFields_ be ISODateToFields(_calendar_, _yearMonth_.[[ISODate]], ~year-month~). 1. Set _thisFields_.[[Day]] to 1. 1. Let _thisDate_ be ? CalendarDateFromFields(_calendar_, _thisFields_, ~constrain~). - 1. Let _otherFields_ be ISODateToFields(_calendar_, _yearMonth_.[[ISODate]], ~year-month~). + 1. Let _otherFields_ be ISODateToFields(_calendar_, _other_.[[ISODate]], ~year-month~). 1. Set _otherFields_.[[Day]] to 1. 1. Let _otherDate_ be ? CalendarDateFromFields(_calendar_, _otherFields_, ~constrain~). 1. Let _dateDifference_ be CalendarDateUntil(_calendar_, _thisDate_, _otherDate_, _settings_.[[LargestUnit]]). From 22af2b8d30930e484a4c580b5e82d2c576881722 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 21 Nov 2024 13:56:34 -0500 Subject: [PATCH 2/2] Editorial: Remove errant [[Duration]] reference from RoundRelativeDuration The `duration` value is already an Internal Duration Record, which is the type returned by RoundRelativeDuration (which does not have an internal slot of [[Duration]] anyhow). --- spec/plainyearmonth.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/plainyearmonth.html b/spec/plainyearmonth.html index ee35413d8..400c74fe6 100644 --- a/spec/plainyearmonth.html +++ b/spec/plainyearmonth.html @@ -615,7 +615,7 @@

1. Let _isoDateTime_ be CombineISODateAndTimeRecord(_thisDate_, MidnightTimeRecord()). 1. Let _isoDateTimeOther_ be CombineISODateAndTimeRecord(_otherDate_, MidnightTimeRecord()). 1. Let _destEpochNs_ be GetUTCEpochNanoseconds(_isoDateTimeOther_). - 1. Set _duration_ to ? RoundRelativeDuration(_duration_, _destEpochNs_, _isoDateTime_, ~unset~, _calendar_, _settings_.[[LargestUnit]], _settings_.[[RoundingIncrement]], _settings_.[[SmallestUnit]], _settings_.[[RoundingMode]]).[[Duration]]. + 1. Set _duration_ to ? RoundRelativeDuration(_duration_, _destEpochNs_, _isoDateTime_, ~unset~, _calendar_, _settings_.[[LargestUnit]], _settings_.[[RoundingIncrement]], _settings_.[[SmallestUnit]], _settings_.[[RoundingMode]]). 1. Let _result_ be ? TemporalDurationFromInternal(_duration_, ~day~). 1. If _operation_ is ~since~, set _result_ to CreateNegatedTemporalDuration(_result_). 1. Return _result_.