You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to create a 0-time Duration for some testing purposes. I don't see anything in the Temporal proposal docs on Duration that seem to prevent this, but it doesn't seem possible in the current polyfill.
If I pass an empty object to .from() I get the error "invalid duration-like". If I pass no arguments to the constructor, or 0 or pass an a 0-valued property to .from(), like .from({minutes: 0}) I get the error "mixed-sign values not allowed as duration fields".
The text was updated successfully, but these errors were encountered:
Hmm, could you provide a public repro case for this? I cannot repro the problem you're seeing. None of the code below (from this codesandbox) throws exceptions with version 0.4.2 of this polyfill.
I need to create a 0-time Duration for some testing purposes. I don't see anything in the Temporal proposal docs on Duration that seem to prevent this, but it doesn't seem possible in the current polyfill.
If I pass an empty object to .from() I get the error "invalid duration-like". If I pass no arguments to the constructor, or
0
or pass an a 0-valued property to .from(), like.from({minutes: 0})
I get the error "mixed-sign values not allowed as duration fields".The text was updated successfully, but these errors were encountered: