Skip to content

Add Time, Now, and Duration expression types#714

Merged
bkeepers merged 1 commit intolearn-the-rulesfrom
time-expressions
Mar 30, 2023
Merged

Add Time, Now, and Duration expression types#714
bkeepers merged 1 commit intolearn-the-rulesfrom
time-expressions

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