Skip to content

Commit 9992f9b

Browse files
ptomato12wrigja
authored andcommitted
Fix nonconformance bug with relativeTo property bag
Previously, a property bag such as { year: 2022, month: 4, day: 18, timeZone: null } would be treated as a PlainDate relativeTo. According to the spec text it should throw a TypeError. Test262 tests for this are in review. UPSTREAM_COMMIT=79c87efbb2d805eee519cfcc8a763d4f41193801
1 parent 7d56247 commit 9992f9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ecmascript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ export function ToRelativeTemporalObject(options: {
10401040
calendar = ToTemporalCalendar(calendar);
10411041
matchMinutes = true;
10421042
}
1043-
if (timeZone) {
1043+
if (timeZone !== undefined) {
10441044
timeZone = ToTemporalTimeZone(timeZone);
10451045
let offsetNs = 0;
10461046
if (offsetBehaviour === 'option') offsetNs = ParseTimeZoneOffsetString(ToString(offset));

0 commit comments

Comments
 (0)