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

Add Time, Now, and Duration expression types #714

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

bkeepers
Copy link
Collaborator

Enable a feature at a specific time:

{
  "GreaterThan": [
    { "Now": [] },
    { "Time": "2023-03-26 13:00:00Z" }
  ]
}

Give an actor a 14 day trial:

{
  "LessThan": [
    { "Property": ["created_at"] },
    {
      "Plus": [
        { "Now": [] },
        { "Duration": [14, "days"] }
      ]
    }
  ]
}

Note: Plus isn't implemented yet, but it's on my list

@bkeepers
Copy link
Collaborator Author

Review and updates in #715

@bkeepers bkeepers merged commit c5bbfdb into learn-the-rules Mar 30, 2023
@bkeepers bkeepers deleted the time-expressions branch March 30, 2023 18:12
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

Successfully merging this pull request may close these issues.

1 participant