Closed a-hegerath closed 3 years ago
Hi, Thanks for the suggestion. I have fixed this in a simpler way. We only can roll out a fix next release. However, if you want to get your hands dirty you can try my fork with the specific changes. (Note: other changes are there too).
https://github.com/deostroll/feel/tree/a0ee54b78fa6751ea38c24c0c3eaa8ee619062dc
Let me know if this works for you. It fixed issues 10/11 I guess.
The comparison of dates (and probably also times) seems to be wrong for inequalities (>, >=, <, <=).
This can be proved by adding the following test case to the file ./test/comparision-expression/feel-comparision-expression.build.spec.js
The error is likely caused by the function "checkInequality" in file utils/helper/fn-generator.js, which applies the operator component-wise (with "component", I mean the date/time parts like year, month, day and so on), which works for equalities but not for inequalities. A possible solution would be to compare the components using two operators - by this we can decide for each component if the inequality holds, or if it does not hold, or if we cannot say and have to proceed to the next component.
Usage of the checkInequality function: