You’ll need to edit the template files (see this).
I would use eo_get_the_start()
, eo_get_the_end()
functions (see documentation) to the get the start and end date as a timestamp. If that is over two days, then display the end date as well as the start date.
Something like the following should work (I’ve not tested it, so there may be some syntax errors!)
$start_ts = (int) eo_get_the_start('U');
$end_ts = (int) eo_get_the_end('U');
if( $end_ts - $start_ts > 2*24*60*60 ){
//Event lasts over 2 days. Display accordingly
}else{
//Does not - display differently.
}
The first argument for the eo_get_the_start
/eo_get_the_end
function is a string date format (php format). So you can display whichever part of the date you want (including just the day of the week – in php format this is denoted ‘l’ (lowercase L) ):
echo 'This event starts on '.eo_get_the_start('l').' and finishes on '.eo_get_the_start('l');
All examples above must be used inside the loop. To use them outside the loop you can pass the event ID as a second argument, (and the occurrence number as the third if applicable). See the above link for more details.