I am using the code below to display the start and end date of an event.
<p><?php echo date("j F Y", strtotime($article['event_starts'])) ?> - <?php echo date("j F Y", strtotime($article['event_finish'])) ?></p>
The code results in this: 18 September 2014 – 20 September 2014
Which is fine when the event runs over two or more days. However, it looks a bit daft when the start and end date is the same. ie: 21 September 2014 – 21 September 2014
Please could someone advise how I could omit the end date if it is the same as the start date.
Thanks
Jeff