I am working on an art gallery site in which we have two views that are filtered based on the date range of an exhibition. One view filters current exhibits (now >= start date && now <= end date) and another that filters upcoming exhibitions (now < start date).
We would like to combine these into a single page view. This is simple enough to do with this date filter: now <= end date. However, I would still like to denote which events are upcoming (be it a CSS class or by rendering the date field as "Opens on Dec. 12th").
Is there a way to render/rewrite the date field differently based on the field's value relative to today's date?
For example, if today's date is Nov. 1, 2015, I would like these two nodes:
- Exhibit #1 (Oct. 1, 2015 - Dec. 1, 2015)
- Exhibit #2 (Jan. 1, 2016 - Feb. 1, 2016)
To render like this:
- Exhibit #1, Ends Dec. 1 2015
- Exhibit #2, Opens Jan 1, 2016