Date Filters
Filters for formatting, comparing, and manipulating dates.
Date Filters
Date filters format, compare, and perform arithmetic on date values.
Format patterns
The format filter accepts the following tokens:
| Token | Output | Example | |-------|--------|---------| | YYYY | 4-digit year | 2026 | | MM | 2-digit month | 03 | | DD | 2-digit day | 06 | | HH | 24-hour hour | 14 | | mm | Minutes | 30 | | ss | Seconds | 45 |
Usage examples
Format a creation date for display:
vars.user.created_at | format('YYYY-MM-DD HH:mm')
Check if a token has expired:
vars.token.expires_at | isBefore('' | now)
Calculate days until deadline:
vars.deadline | diffInDays('' | now)
Set an expiration date 30 days from now:
'' | now | addDays(30) | toISO
Filters Reference /reference/filters Browse all filter categories Number Filters /reference/filters/number Round, clamp, and transform numbers String Filters /reference/filters/string Format dates as strings