Support Center

Please check docs.livewhale.com for the most up-to-date LiveWhale CMS and LiveWhale Calendar documentation. The below legacy documentation will remain available as a reference until the documentation migration is complete.

Formatting start_date & end_date

Last Updated: Jan 16, 2015 12:36PM PST

The start and end date widget arguments are available on many of the main content types, where a primary date is available to compare against. For both, you may use any of the following in either of these two arguments:

<arg id="start_date">10/31/2013</arg> <!-- a fixed date in US format -->

For any date, fixed or relative, the time is assumed to be midnight. For example, if you wish to only pull content from a single day, you would enter that day for the start_date and the next day for the end_date. Using the same day in both fields always produces no results, since the times are equivalent.

Relative Dates

LiveWhale utilizes PHP’s built-in relative date tools to calculate actual dates at the time the widget is run. The available options are available in the PHP documentation, but suffice it to say, that you can generally use terms like:

<arg id="start_date">-1 weeks</arg> <!-- same day one week ago -->

<arg id="start_date">monday this week</arg> <!-- monday for the current week, Su-Sa US format -->

<arg id="start_date">next month</arg> <!-- the first day of next month -->

<arg id="start_date">+1 years</arg> <!-- same date as today, one year in the future -->

Typically, plural and singular don’t matter (e.g. week versus weeks) but, because months are flexible in length, do note that there are caveats to using them and although best guesses are made, approximations are sometimes off.