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
Starting a composite duration with a minus sign will only treat the first block as negative.
Example: 1h30m => 5400000 CORRECT -1h30m => -1800000 WRONG: This translates to -30 minutes -1h30m => -5400000 CORRECT but weird
💡 Expected Behavior
The entire duration is set to negative, so for example, having -1h30m should return -5400000. This is currently achieved with -1h-30m, which is very weird.
↩️ Is This a Regression?
No.
🔬 Minimal Reproduction
Steps to reproduce the behavior:
Use a composite duration that begins with a minus sign, but with no subsequent minus signs afterwards.
🔥 Error or Exception
If there's an error or an exception, please share it below:
None.
🌍 Environment
Describe your relevant environment (device, OS, browser, Node.js, packages, etc.):
Node v14.15.4
NPM 6.14.10
Windows 10 64bit
@standards/duration: 1.1.3
🖼️ Screenshots
💬 Anything Else?
None.
The text was updated successfully, but these errors were encountered:
🐞 Description
Starting a composite duration with a minus sign will only treat the first block as negative.
Example:
1h30m
=>5400000
CORRECT-1h30m
=>-1800000
WRONG: This translates to -30 minutes-1h30m
=>-5400000
CORRECT but weird💡 Expected Behavior
The entire duration is set to negative, so for example, having
-1h30m
should return-5400000
. This is currently achieved with-1h-30m
, which is very weird.↩️ Is This a Regression?
No.
🔬 Minimal Reproduction
Steps to reproduce the behavior:
🔥 Error or Exception
If there's an error or an exception, please share it below:
None.
🌍 Environment
Describe your relevant environment (device, OS, browser, Node.js, packages, etc.):
Node
v14.15.4
NPM
6.14.10
Windows 10 64bit
@standards/duration:
1.1.3
🖼️ Screenshots
💬 Anything Else?
None.
The text was updated successfully, but these errors were encountered: