Date & Time Operators
Date operators let you compare dates, check if something is recent, and validate ages.
Later Than
Check if a date is after another date:
__expiry__ of **License** is later than date(2024-01-01)Interactive Example
Policy Rule
Test Data (JSON)
Earlier Than
Check if a date is before another date:
__created__ of **Account** is earlier than date(2020-01-01)Interactive Example
Policy Rule
Test Data (JSON)
Within (Recency)
Check if a date is within a duration from now:
__last_login__ of **User** is within 30 days__test_date__ of **Driver** is within 2 yearsSupported time units: seconds, minutes, hours, days, weeks, months, years, decades, centuries.
Interactive Example
Policy Rule
Test Data (JSON)
Older Than
Check if a date-based age exceeds a duration. Useful for age verification:
__date_of_birth__ of **Person** is older than 18 yearsInteractive Example
Policy Rule
Test Data (JSON)
Younger Than
The inverse of older than:
__date_of_birth__ of **Person** is younger than 65 yearsInteractive Example
Policy Rule
Test Data (JSON)
Duration Units
All supported time units:
| Unit | Singular | Plural |
|---|---|---|
| Second | second | seconds |
| Minute | minute | minutes |
| Hour | hour | hours |
| Day | day | days |
| Week | week | weeks |
| Month | month | months |
| Year | year | years |
| Decade | decade | decades |
| Century | century | centuries |