Working with Dates in the Subscription Manager
The Subscription Manager exposes several helper functions that make it easy to display and calculate dates.
Formatting Dates
In Liquid files, you can use the date filter to format a date string (e.g. "2025-02-16") for display:
This will display “Subscription Start Date: February 16, 2025”.
To specify how the date is formatted, pass a format string. The date filter uses dayjs to parse and format dates — refer to their documentation for available formats. For example:
Computing Dates
You can also use the dayjs library in the Subscription Manager to manipulate date values, without having to perform date computations yourself.
For example, to calculate a date 15 days after the subscription start date, add this function to your script.js:
Then display it in a Liquid file:
Refer to the dayjs docs for the available manipulation methods.