Skip to content
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

Subtraction of dates does not return days-time-duration #953

Open
nicpuppa opened this issue Nov 25, 2024 · 0 comments
Open

Subtraction of dates does not return days-time-duration #953

nicpuppa opened this issue Nov 25, 2024 · 0 comments
Labels
support relates to a support case type: bug

Comments

@nicpuppa
Copy link
Contributor

Describe the bug

The Subtracion of two date doesn't return a days in time duration as described in the documentation, instead it returns an hours duration

date("2020-04-06") - date("2020-04-01")
// duration("P120H")

There is a workaround, wrap the subtracion in the string() function

string(date("2020-04-06") - date("2020-04-01"))
date("2020-04-06") - date("2020-04-01")
// duration("P5D")

To Reproduce

Use the playground and evaluate the expression date("2020-04-06") - date("2020-04-01")

Expected behavior
The subtraction should return a duration of days also without the string wrap

Environment

  • FEEL engine version: latest version, but also previous ones

SUPPORT-24657

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support relates to a support case type: bug
Projects
None yet
Development

No branches or pull requests

1 participant