Created
August 17, 2022 06:18
-
-
Save vorvulev/c645fd98f4be04bd5a2c8ff1bd028bdc to your computer and use it in GitHub Desktop.
Set date to tomorrow in liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign wday = 'now' | date: "%a" %} | |
{% if wday == 'Thu' %} | |
{% assign days = 2 | times: 86400 %} | |
{% else %} | |
{% assign days = 1 | times: 86400 %} | |
{% endif %} | |
{% assign deliverydate = 'now' | date: "%s" | plus: days | date: "%Y-%m-%d" %} | |
GET IT TOMORROW! ORDER WITHIN <span id="time">{{ deliverydate }}</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment