-
Notifications
You must be signed in to change notification settings - Fork 171
Closed
Labels
non-prod-polyfillTHIS POLYFILL IS NOT FOR PRODUCTION USE!THIS POLYFILL IS NOT FOR PRODUCTION USE!
Description
Reproducers:
const calendar = 'chinese';
const a = new Temporal.PlainDate(2016, 7, 31, calendar);
const b = new Temporal.PlainDate(2017, 7, 31, calendar);
b.since(a, { largestUnit: 'years' });const calendar = 'hebrew';
const a = new Temporal.PlainDate(1967, 2, 28, calendar);
const b = new Temporal.PlainDate(1968, 3, 1, calendar);
a.until(b, { largestUnit: 'years' });Crashes with:
file:///.../proposal-temporal/polyfill/lib/ecmascript.mjs:2859
if (sign !== 0 && propSign !== sign) throw new RangeErrorCtor('mixed-sign values not allowed as duration fields');
^
RangeError: mixed-sign values not allowed as duration fields
at Module.RejectDuration (file:///.../proposal-temporal/polyfill/lib/ecmascript.mjs:2859:50)
at new Duration (file:///.../proposal-temporal/polyfill/lib/duration.mjs:68:8)
at TemporalDurationFromInternal (file:///.../proposal-temporal/polyfill/lib/ecmascript.mjs:3009:10)
at Module.DifferenceTemporalPlainDate (file:///.../proposal-temporal/polyfill/lib/ecmascript.mjs:3769:16)
I haven't investigated these, except to check that they are not regressions from #3156. I'm opening this issue so I don't forget to investigate this at some later time.
Metadata
Metadata
Assignees
Labels
non-prod-polyfillTHIS POLYFILL IS NOT FOR PRODUCTION USE!THIS POLYFILL IS NOT FOR PRODUCTION USE!