Year is
Merges different content depending on whether a date falls in a given year.
Syntax
There are two ways to use this tag.
Check a date you supply:
{{#ifYearIs date value}}true content{{else}}false content{{/ifYearIs}}
Check today's date:
{{#ifYearIs value}}true content{{else}}false content{{/ifYearIs}}
The difference is simply how many values you give it. With two, it checks the date you pass. With one, it checks today.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Date | Date | Optional | The date to check. Leave it out to check today instead. |
| Value | Number | Required | The four digit year to check for, such as 2026. |
Note: When you leave the date out, "today" means today in your account's time zone, not UTC. Your email still sends normally whatever the values are.
Examples
A. Checking a contact's date
{{#ifYearIs Contact.signupDate "2026"}}Welcome aboard{{else}}Thanks for staying with us{{/ifYearIs}}
Shows the new-customer note when the contact signed up in 2026.
B. Checking today
{{#ifYearIs "2026"}}Welcome aboard{{else}}Thanks for staying with us{{/ifYearIs}}
Shows the new-customer note during 2026.
If the date or the value cannot be read, it is not treated as a match, so false content is shown.