v3.5.2: Calculating difference between two stored dates returns :undefined
sjieg opened this issue · 2 comments
sjieg commented
Hey, first of all, thanks for the amazing work on Dentaku, we've been using it our project successfully for a long time now and it adds a lot of value!
Steps to reproduce
calculator = Dentaku::Calculator.new
calculator.store("d1", Date.parse("2024/01/02"))
calculator.store("d2", Date.parse("2024/01/06"))
calculator.solve("d1 - d2")
expected
{"[]"=>(-4/1)}
actual since 3.5.2
{"[]"=>:undefined}
I didn't test the actual commit that broke this (or maybe this is new expected behaviour), but I suspect this commit: 8aa37bc
@ignatiusreza maybe you could have a look?
sjieg commented
Good stuff, glad I could help and thanks for the good work!