Temporal.Duration.from('P05DT')
This code throws RangeError in Firefox Nightly, @js-temporal/polyfill and reference polyfill, but returns duration with 5 days in temporal-polyfill.
According to the spec, TimeDesignator should be followed by DurationHoursPart, DurationMinutesPart or DurationSecondsPart. Thus this polyfill is probably not spec-compliant.
https://tc39.es/proposal-temporal/#prod-DurationTime
note: it seems that test262 doesn't cover this invalid case.
https://github.com/tc39/test262/blob/main/test/built-ins/Temporal/Duration/from/argument-string-invalid.js
This code throws
RangeErrorin Firefox Nightly,@js-temporal/polyfilland reference polyfill, but returns duration with 5 days intemporal-polyfill.According to the spec,
TimeDesignatorshould be followed byDurationHoursPart,DurationMinutesPartorDurationSecondsPart. Thus this polyfill is probably not spec-compliant.https://tc39.es/proposal-temporal/#prod-DurationTime
note: it seems that test262 doesn't cover this invalid case.
https://github.com/tc39/test262/blob/main/test/built-ins/Temporal/Duration/from/argument-string-invalid.js