Day is
Merges different content depending on whether a date falls on a given day of the week.
Syntax
There are two ways to use this tag.
Check a date you supply:
{{#ifWeekDayIs date value}}true content{{else}}false content{{/ifWeekDayIs}}
Check today's date:
{{#ifWeekDayIs value}}true content{{else}}false content{{/ifWeekDayIs}}
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 day of the week to check for, from 1 for Sunday to 7 for Saturday. |
Note: When you leave the date out, "today" means today in your account's time zone, not UTC. Days are numbered from 1 for Sunday through to 7 for Saturday.
Examples
A. Checking a contact's date
{{#ifWeekDayIs Contact.signupDate "6"}}Have a good weekend{{else}}Have a good week{{/ifWeekDayIs}}
Shows the weekend note when the contact signed up on a Friday.
B. Checking today
{{#ifWeekDayIs "6"}}Have a good weekend{{else}}Have a good week{{/ifWeekDayIs}}
Shows the weekend note on Fridays.
If the date or the value cannot be read, it is not treated as a match, so false content is shown.