We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
we are using https://www.nuget.org/packages/RulesEngine/ to execute rules
which does use expression.CompileFast(); Reference : https://github.com/microsoft/RulesEngine/blob/main/src/RulesEngine/ExpressionBuilders/RuleExpressionParser.cs#L68
expression.CompileFast()
for certain expression of date difference it giving wrong negative values, while expression.Compile() is giving correct result for below expressions
expression.Compile()
e.g.
(DateTime.Now - Contract.StartDate).TotalDays (DateTime.Now.Date - Contract.StartDate.Date).TotalDays
is giving wrong --10675001 value instead of 198, when DateTime.Now is 2024-07-17T19:09:02.088+05:30 and StartDate is 2024-01-01
--10675001
198
2024-07-17T19:09:02.088+05:30
2024-01-01
while its working fine for below expressions in FastExpressionCompiler
(Contract.StartDate - Contract.StartDate).TotalDays (DateTime.Now - DateTime.Now).TotalDays
Looking for fix or some workaround for this scenario.
Thanks!
The text was updated successfully, but these errors were encountered:
add failing test for #421
291b77a
@maulik-chavda Bug is confirmed, working on the fix.
Sorry, something went wrong.
8d6a169
dadhi
No branches or pull requests
Hi,
we are using https://www.nuget.org/packages/RulesEngine/ to execute rules
which does use
expression.CompileFast()
; Reference : https://github.com/microsoft/RulesEngine/blob/main/src/RulesEngine/ExpressionBuilders/RuleExpressionParser.cs#L68for certain expression of date difference it giving wrong negative values, while
expression.Compile()
is giving correct result for below expressionse.g.
is giving wrong
--10675001
value instead of198
, when DateTime.Now is2024-07-17T19:09:02.088+05:30
and StartDate is2024-01-01
while its working fine for below expressions in FastExpressionCompiler
Looking for fix or some workaround for this scenario.
Thanks!
The text was updated successfully, but these errors were encountered: