LiveWhale

Welcome, Guest Login

Support Center

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 -->
  • <arg id="start_date">31-10-2013</arg> <!-- a fixed date in EUR format -->
  • <arg id="start_date">-1 weeks</arg> <!-- a relative date, see below -->

 

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.

 

 

eb8f96c071020d8b0923da726d6cab65@livewhale.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete