Search

I have a datasource in which I'm trying to filter by a supplied date or a range as default. My first instinct was to try:

{$date:1970-01-01 to $today}

But that didn't work, after a few tests I discovered that the following works:

{$date:1970-01-01 to 2012-12-12}

But that's less than ideal as I want to be able to post article in the future and not have them publish until the set date.

So the question is, why would the latter work, but not the former?

I haven't got into filtering properly yet so this may be wrong, but perhaps you need to wrap $today in its own curly brackets.

Date source filters

There is also a very useful wiki page regarding date field filtering: https://github.com/symphonycms/symphony-2/wiki/DateField.

Haveyou tried this:

{$date:1970-01-01 to today}

or:

{$date:equal to or earlier than today}

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details