How to add days to date in Shopify liquid

Hura Product Showcase Builder

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.

Hura Theme Blocks

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. Required fields are marked *