Hi, I thought I mastered the art of displaying dates as “1-2 november 2015”. The shortcode below does this. But when I have a 1-day event it displays “1-1 november 2015” Please help me a find a way out of this. This is just a simple list of all upcoming events.
[eo_events]<strong><a href="%event_url%">%event_title%</a></strong> %start{j}%-%end{j}% %start{M}% %end{Y}% <a href="%event_url%">Läs mer och boka här.</a>
[/eo_events]
//Frank

Frank Dandenell
Hi Frank,
Unfortunately adapting the date format according to the start/end format is not possible using the placeholders. You’d need to replace the above with just [eo_events]
and then edit the event list shortcode template (you can find it in event-organiser/templates/event-list-shortcode.php
.
You can then format the date accordingly:
$start_format = 'j M Y';
$end_format = false;
if ( eo_get_the_start( 'Ymd' ) != eo_get_the_start( 'Ymd' ) ) {
//Event starts and ends on different dates
$start_format = 'j';
$start_format = '- j M Y';
}
//Print start date
eo_the_start( $start_format );
if ( $end_format ) {
//If end date is different from start date, print end date.
eo_the_end( $end_format );
}
You could do further checks in case the event spans across a month or year, but I’ll leave you to make those adjustments.

Stephen Harris