I'm trying to figure out how to send a specific message when the time is before or after a certain time.
I have a weekly recurring event (midday every Monday) and although I can vary messaging depending on the day of the week, I can't figure out how to go more granular and send different messaging depending on whether the current time is before or after midday on a certain day.
I'm struggling to find an answer because most logic is in relation to one single event (with a date and a time) whereas mine just needs to be in relation to a specific time that repeats once a week.
This is what I started off with:
{% assign today = 'now' | date: "%A" %}
{% assign time = 'now' | time_zone: ${time_zone} %}
{% case ‘today' %}
{% when 'Monday' %}
{% if hour < 12:00%}
Today's the big day!
{% if hour > 12:00%}
You have till next Monday
{% else %}
Default copy
{% endcase %}
But I'm definitely very far off, so I would love any help!
Thank you!