From fc5fdf234d1af4f659397be46b2f82652ace1067 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Mon, 2 Nov 2020 17:41:28 +0530 Subject: [PATCH] fixup! spec: Date.from and parsing updates --- polyfill/lib/ecmascript.mjs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/polyfill/lib/ecmascript.mjs b/polyfill/lib/ecmascript.mjs index 905e1ddd56..805ec41490 100644 --- a/polyfill/lib/ecmascript.mjs +++ b/polyfill/lib/ecmascript.mjs @@ -935,12 +935,12 @@ export const ES = ObjectAssign({}, ES2020, { const TemporalTime = GetIntrinsic('%Temporal.Time%'); const time = calendar.timeFromFields(fields, { overflow }, TemporalTime); - hour = GetSlot(time, ISO_HOUR); - minute = GetSlot(time, ISO_MINUTE); - second = GetSlot(time, ISO_SECOND); - millisecond = GetSlot(time, ISO_MILLISECOND); - microsecond = GetSlot(time, ISO_MICROSECOND); - nanosecond = GetSlot(time, ISO_NANOSECOND); + const hour = GetSlot(time, ISO_HOUR); + const minute = GetSlot(time, ISO_MINUTE); + const second = GetSlot(time, ISO_SECOND); + const millisecond = GetSlot(time, ISO_MILLISECOND); + const microsecond = GetSlot(time, ISO_MICROSECOND); + const nanosecond = GetSlot(time, ISO_NANOSECOND); return { year, month, day, hour, minute, second, millisecond, microsecond, nanosecond }; }, @@ -1189,12 +1189,12 @@ export const ES = ObjectAssign({}, ES2020, { GetSlot(dt, ISO_YEAR), GetSlot(dt, ISO_MONTH), GetSlot(dt, ISO_DAY), - GetSlot(dt, HOUR), - GetSlot(dt, MINUTE), - GetSlot(dt, SECOND), - GetSlot(dt, MILLISECOND), - GetSlot(dt, MICROSECOND), - GetSlot(dt, NANOSECOND) + GetSlot(dt, ISO_HOUR), + GetSlot(dt, ISO_MINUTE), + GetSlot(dt, ISO_SECOND), + GetSlot(dt, ISO_MILLISECOND), + GetSlot(dt, ISO_MICROSECOND), + GetSlot(dt, ISO_NANOSECOND) ); if (epochNs === null) throw new RangeError('ZonedDateTime outside of supported range'); const TemporalInstant = GetIntrinsic('%Temporal.Instant%');