How to add days to date in Shopify liquid

Sell Online With Shopify
Trusted by millions of businesses worldwide
Start your Shopify 14-day free trial and save up to 25% on Shopify when you sign up for an annual, 2-year, or 3-year plan.

Are you want to add days to date? Here is the solution to add days to the current date or desired date using Shopify liquid.

Add days to date

The following source code will add 5 days to date.

Result: 2015-04-25

Add days to current date

The following source code will add 5 days to current date.

You may also like...

1 Response

  1. Bob says:

    Why do the math like that when you can just assign the seconds?

    For 30 days, google how man seconds in 30 days

    {% assign seconds = 2592000 %} yeilds same results, and much simpler.

Leave a Reply

Your email address will not be published.