The below example uses ESL variables withelseif
to define someone's zodiac sign for their horoscope.
To take it further, you use this DOB logic to target contacts born in a specific season, for example, spring. If the DOB year is also available in the database, you can use that to figure out the Chinese zodiac.
Hey {% if contact.4|localized_date('en','Mdd') > 1221 or contact.4|localized_date('en','Mdd') < 120 %}
Capricorn
{% elseif contact.4|localized_date('en','Mdd') > 1122 %}
Sagittarius
{% elseif contact.4|localized_date('en','Mdd') > 1022 %}
Scorpio
{% elseif contact.4|localized_date('en','Mdd') > 922 %}
Libra
{% elseif contact.4|localized_date('en','Mdd') > 822 %}
Virgo
{% elseif contact.4|localized_date('en','Mdd') > 722 %}
Leo
{% elseif contact.4|localized_date('en','Mdd') > 620 %}
Cancer
{% elseif contact.4|localized_date('en','Mdd') > 520 %}
Gemini
{% elseif contact.4|localized_date('en','Mdd') > 419 %}
Taurus
{% elseif contact.4|localized_date('en','Mdd') > 320 %}
Aries
{% elseif contact.4|localized_date('en','Mdd') > 218 %}
Pisces
{% elseif contact.4|localized_date('en','Mdd') > 120 %}
Aquarius
{% endif %}, it's time to celebrate