Skip to content
New issue

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

Date and time handling #27

Open
larsbuch opened this issue Dec 29, 2020 · 3 comments
Open

Date and time handling #27

larsbuch opened this issue Dec 29, 2020 · 3 comments

Comments

@larsbuch
Copy link

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?

@atulagrawal
Copy link

atulagrawal commented Jun 9, 2021

+1 as I have also few use cases for date validation !!

@RuairiSpain
Copy link

This is an important feature for Open Feature and Flagd support

@RuairiSpain
Copy link

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"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants