-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in string conversion of negative duration #599
Comments
We (Zeebe Process Automation) want to patch this, but wrapping up the Zeebe 8.2 release has our priority. Marking this as |
…meDuration * fix toString() of ValDayTimeDuration * add test cases for negative day/time durations
I've searched for an Issue for my first contribution on open source and gave this one a try. I found a solution to fix this. But i have a question related to the expected behavior. The underlying java.time.Duration parses from an expression like "-PT1M1S" an equivalent expression "PT-1M-1S". If this fits your needs I'm done. If not then there is a little more work to do. I will open a pull request and love to see feedback. |
@sebi87 That's great! I see that @saig0 is already assigned as reviewer 🎉 I just noticed that I made a typo in the expected behavior:
Should of course be:
It should also be fine if this becomes |
@korthout yeah, I assumed that it’s a typo |
The DMN spec is not very clear about the format: (DMN 1.4, page 108) The reference to the XPath document is not much better: However, I found a related test case in the DMN TCK. Since this is the reference for all DMN vendors, we should follow this example to pass the test case. Based on this test case, the format should be |
Okay, I will have a look. |
* fix toString() of ValDayTimeDuration * add test cases for negative day/time durations (cherry picked from commit 2189ddd)
* fix toString() of ValDayTimeDuration * add test cases for negative day/time durations (cherry picked from commit 2189ddd)
Describe the bug
A negative duration is converted to a positive duration (double negation).
To Reproduce
Expected behavior
The result of
string(duration("-PT1S"))
should be"-PT1S"
Environment
The text was updated successfully, but these errors were encountered: