title: Shopify Liquid finding out date of a specific day of the week
body: <p>Wondering if someone could help with a question on Liquid / Shopify. I am working with a store that delivers product every Thursday, provided you order by Tuesday 12pm of the same week. </p>
  
  <p>In the notification to the customer, I needed to indicate which Thursday it will ship i.e. 'This' or 'Next' based on order date. I have accomplished that with the following logic in liquid:</p>
  
  <pre><code>{% if  date | date: "%A" == 'Tuesday' and date | date: "%k" &gt; 12 %}
     Your order will be delivered on Thursday of next week.
  {% elsif date | date: "%A" == 'Wednesday' or date | date: "%A" == 'Thursday' %}
      Your order will be delivered on Thursday of next week.
  {% else %}
      Your order will be delivered this Thursday
  {% endif %}
  </code></pre>
  
  <p>Above does the job for the moment. However, I've been tasked to actually publish the 'date' of the Thursday of delivery. I've racked my brains and tried to figure out a way where I can write a function in liquid to tell me what 'This' Thursdays date is and what 'Next' Thursdays date will be. But I'm coming up trumps. I know how to do this in PHP and Ruby using the inbuilt functions but I'm new to Liquid and don't think it has inbuilt functions because it's a markup language (. So I would think you'd have to do some unix time math, but that makes it really complex.</p>
  
  <p>Is there another way, or do I have to resort to using some convoluted unix timestamp math?</p>
  
  <p>Thanks.</p>