CacheControl / CacheControl/json-rules-engine

operator greaterThan, lessThan not working properly for Date. It is only comparing day part, but not considering month and year while comparing

Open
#375 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.1k
Forks
507
PR merge metrics
No merged PRs in 30d

Description

it not working on date(json-rules-engine-6.5.0).
greaterThan working only on date’s day, it is not considering month and year. Let say datefield ABC value is “05 Apr 2022“, and we configure condition "if value “06 Apr 2021“ greaterThan ABC", then it is true as per library. Similarly, “04 Apr 2024“ greaterThan ABC is false as it only compare “04“ with “05“ and neglecting month and year part in comparison of dates.

{"conditions":{"any":[{"fact":"SomeProperty","tabnum":"1","value":"06-Sep-2024","operator":"greaterThan"}]}}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.