-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
🐞 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:
- 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.
richrdkng
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working