I've got a Calendar events search page set up and it's functioning well. However, it's the display of the results I'm having some issues with... specifically with Recurring Calendar Events. I'm not sure if I've encountered a bug?
The following code is what I've used on the display format for Single Calendar Events, and it works perfectly:
%event_start_datetime_j% %event_start_datetime_F%%event_end_date^replace_keywords:neq_date:{event_start_date}:–{event_end_datetime_j} {event_end_datetime_F}^replace:–{event_end_datetime_j} {event_end_datetime_F}:%%event_short_start_time^notempty:,% %event_short_start_time%%event_short_end_time^notempty:–%%event_short_end_time%
It's basically saying as long as the end date is not the same as the start date it can be printed... and then where the end date has not been filled in, don't print the Matrix keywords (I initially tried chaining with empty or notempty and I couldn't get it to work for all possible date combinations). Dates are shown on the results page like the following, which is what we want:
7 September
9 September, 12pm-2pm
17 September-18 September
21 September-29 September, 9am-5pm
And this sort of output is successfully avoided:
9 September-9 September, 12pm-2pm
The trouble I'm having is with the Recurring Calendar Events display format when the code is changed to use instance keywords:
%instance_start_datetime_j% %instance_start_datetime_F%%instance_end_datetime^replace_keywords:neq_date:{instance_start_datetime}:–{instance_end_datetime_j} {instance_end_datetime_F}^replace:–{instance_end_datetime_j} {instance_end_datetime_F}:%%event_short_start_time^notempty:,% %event_short_start_time%%event_short_end_time^notempty:–%%event_short_end_time%
The modifiers don't appear to be working at all when the instance keywords are used. On a recurring event that spans 2 days, the end date doesn't show at all (e.g. 20 September, 3pm-4pm should be 20 September-21 September, 3pm-4pm). Sure I can revert back to using the event keywords for the end date, but there are too many opportunities for that to go horribly wrong, depending what sort of recurring events people end up putting in.
I've been staring at this a long time so I'm wondering if I'm missing something. Is there a way to do this, or have I encountered a bug with keyword modifiers and 'instance' keywords?
Thanks!