Open larsbuch opened 3 years ago
+1 as I have also few use cases for date validation !!
This is an important feature for Open Feature and Flagd support
Actually this does work, but if you are looking for a date rule, the data payload needs to match the variable names you set in the rules. I so if you want a beta test rule for feature flags, just send in the current date for both start and end.
Rule: { "and" : [ {">=" : [ { "var" : "start" }, "2023-03-01" ] }, {"<=" : [ { "var" : "end" }, "2023-04-01" ] } ] }
Data: { "start" : "2023-03-01", "end" : "2023-03-01"}
These business rules defined in json logic is missing one essential thing as far as I see it that is date time handling in rules. I would love to be able to expres business rules in a generic way for frontend and backend and documentation but date and time is a part of the core. ISO date and time is the only needed support as all languages have conversion support.
Is there a suggestion of how to handle that?