Filtering dates by season
This is an open discussion with 2 replies, filed under Troubleshooting.
Search
Sounds like you need some custom page params representing seasons. It could potentially be done with a simple Extension. Install cookie monster, and you will be adding a delegate for manipulating the page parameters. If you then used that delegate to add something like this-summer = '2008-12-01 to 2009-02-28'
into the page params, you could use it in your DS.
Create a folder /extensions/seasons/
and put the code from the link into a file called extension.driver.php
. You will probably want to tweak those date ranges to make them dynamic, but it's a start.
I haven't tested it at all, so let me know if that helps.
Thanks Alistair, I'll give it a shot
Create an account or sign in to comment.
I need to display a series of calendar events by season. I have been using $this-year in my cal. event DS filter, but I forgot about winter (or should I say summer?) spanning this year and next year. The problem is that if it is December, I need to also get next year's Jan-Feb. If it is Jan-Feb, i need to also get last year's December (the events are not to be removed after they happen until the next season).
Any ideas?