Week is
Merges different content depending on whether a date falls in a given week of the year.
Syntax
There are two ways to use this tag.
Check a date you supply:
{{#ifWeekIs date value}}true content{{else}}false content{{/ifWeekIs}}
Check today's date:
{{#ifWeekIs value}}true content{{else}}false content{{/ifWeekIs}}
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 week of the year to check for, from 1 to 53. |
Note: When you leave the date out, "today" means today in your account's time zone, not UTC. Weeks are numbered using the ISO standard, from 1 to 53.
Examples
A. Checking a contact's date
{{#ifWeekIs Contact.signupDate "5"}}This week's offer{{else}}See all offers{{/ifWeekIs}}
Shows the week-5 promotion when the contact signed up in week 5.
B. Checking today
{{#ifWeekIs "5"}}This week's offer{{else}}See all offers{{/ifWeekIs}}
Shows the week-5 promotion during week 5.
If the date or the value cannot be read, it is not treated as a match, so false content is shown.