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
- 主要语言
- JavaScript
- 星标
- 3.1k
- 派生
- 507
- PR 合并指标
- 30 天内没有已合并 PR
描述
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"}]}}
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先针对 json-rules-engine 6.5.0 重现 issue 中的 greaterThan 条件,然后定位 greaterThan 和 lessThan 运算符的实现及其日期相关测试。完成的标准是比较会考虑完整日期,包括日、月和年,而不是只考虑日期部分。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100