Search

Hey everyone,

I have a section of employees that contains a date field for when they were hired. I want to display an "upcoming anniversaries" list (showing employees who are having their X year anniversary that week or month), but because some of these dates are years old, I'm not sure how to best go about that.

From what I understand, you can't filter on just the day/month. Anyone have some tricky way or idea on how I could achieve this?

Thanks!

You can use regular expressions in your DS filter. Have a look at this thread http://getsymphony.com/discuss/thread/88304/. Something like regexp:^(1|2)[0-9][0-9][0-9]-{$this-month}- would get all entries of the current month, independent from the year.

Ah, very cool. I need to learn more about regular expressions, thanks for the tip!

I could be wrong, but it looks like I can't combine filters if I use regexp? So I can't do something like: regexp:^(1|2)[0-9][0-9][0-9]-{$this-month}- + later than {$today} Anyone know if I'm correct, or is there possibly a different way to format the regexp to allow for filter combinations?

This will suffice, as I can sort out later than today dates in my xslt, but I am just curious.

I could be wrong, but it looks like I can't combine filters if I use regexp?

I'm afraid that's not possible. Using the regexp: modifies triggers a completely diferent SQL cration method that doesn't parse the date.

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