Date comparison Logic / in Liquid Filter
问题 I'm trying to add 30 days to a pre-order date and if today's date is later, display a text string and if not display another text string. Any ideas where I'm going wrong? {% assign assign pre_date = 259200 | plus: order.created_at | date: '%s' %} {% assign today_date = 'now' | date: '%s' %} {% if pre_date > today_date %} disply this {% else %} this {% endif %} 回答1: The date filter returns a string, even when you're using %s to get a number of seconds, so Shopify may be running into situations