0 users online. Create an account or sign in to join them.Users

Search

@ibolmo

Maybe have a constant for the beginning of time and the end of time:

There is something like that in S2.1. This syntax basically goes from the beginning to the end of Unix time, but achieves the same results.

 later than {$foo-date}
 earlier than {$foo-date}

What's up with the date field parameters? They used to return a full time stamp

 2008-10-16 00:14:35

Now in 2.1, it only returns this:

 10/16/2008

Which is the preference I set for the date format when I installed. Is there a way to get the date and time so I can be more specific with my DS?

Well, if I change the date format to be more specific in the config.php file, I can get a more specific result in the date parameter. I wonder if this will break anything ...

I'm filtering a date source off of a date field with the following url parameters...

{$year}-{$month}-{$day}

This generates the following data...

http://domain.com/page/2009/ => this shows all of the entries for 2009 http://domain.com/page/2009/03 => this shows all of the entries for March 2009 http://domain.com/page/2009/03/16 => this returns no records even though there is a record for the date

I know this was mentioned above, is there anyway to get the data source to show the entry for a specific date without using 2009-03-16 to 2009-03-16?

 Like briandrum mentioned above...
 Should '2007-01-01' not also serve as a shortcut for '2007-01-01 to 2007-01-01'?

Any help would be greatly appreciated.

These are all great comments. What i am looking to go is select a span of future dates.Is there a way to do that, something like this even though i know this isn't the right way to do it:

{$this-year+5}-{$this-month+5}-{$this-day+5} to {$this-year+12}-{$this-month+12}-{$this-day+12}

iPOTS, have you tried what you wanted to do? XSLT supports simple arithmetic, so your solution may possibly work. if it doesn't work like above, you can try and set variables or params storing those values instead:

<xsl:variable name="five-years" select="$this-year + 5" />
<xsl:variable name="five-months" select="$this-month + 5" />
<xsl:variable name="five-days" select="$this-day + 5" />
<xsl:variable name="twelve-years" select="$this-year + 12" />
<xsl:variable name="twelve-months" select="$this-month + 12" />
<xsl:variable name="twelve-days" select="$this-day + 12" />

then spit it out like above:

{$five-years}-{$five-months}-{$five-days} to {$twelve-years}-{$twelve-months}-{$twelve-days}

here's a link to some more info about XSLT math capabilities.

Makes sense. I was trying to use that format in to filter the DataSource. I could retrieve all the dates then filter then down with XSLT but that might end up using lots of processing power.

I figured it out. thanks

what was your solution?

So... Reiterating bzerangue and briandrum, using {$year}-{$month}-{$date} in a filter will not give me an individual record that matches that date?

i.e. A date datatype can be selected by year or month but not by date?

Can you filter within time specific date ranges for example:

2009-07-22 23:14:35 to {$today}

I am afraid that the filters still don’t work using time (which they should, indeed). But this will work:

2009-07-22 to {$today}

Is there a way to filter the data source like so, {$today} to 6 days?

So, in other words, I just want the item to stay for six days until the next item is available.

You’ll need to create a parameter to sort with. I think the easiest way to do it would be to use the Global Parameter Loader to push out a $today-plus-6 parameter.

does anyone know how to create a “monthly” archive link list? I want to have a list of links that are like december 2009, november 2009 etc. I’m having a hard time grasping the filtering and sorting of dated posts.

Grouping by date will do what you are after :)

It’s the bottom right select box above where you choose what fields you’d like to include.

@brendo - does that create the archive list of links? I can see where you’re coming from with grouping the posts in that it will filter based on year/month combo, right?

Hi friends!

i need make a birthday panel for a project and i don’t know how i will do the dates comparations in Data Source, all attempt don’t have sucess. I have a section with users from system and a date field with birth date and need get all users that be birthday. if someone can help me i thank.

If you filter by date using {$today}, doesn’t this work?

Yes friend, but i need filter the birthdays and in {$today} return the year of Now and a data field in section is other year…exemple…

Data field on Section = 1988-12-05 $today = 2010-12-05

don’t work cuz 2010 != 1988… understand?

i Need see all users in section with birthday today…

You could either try the Repeating Date Field extension or a regular expression like

regexp:^[0-9]*-{$this-month}-{$this-day}

in the datasource filter. See the Data Source Filters page for documentation. But be careful with other special regex strings (like +), they might have a special meaning in the data source filter as well and would get parsed by Symphony in the SQL building process.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details