Apina

EE3 modify widget dates

Aug 18th, 2014
8
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. This line controls the individual output for each event:
  2.  
  3. <li><a href="<?php echo $registration_url; ?>"><?php echo stripslashes_deep($event->event_name) ?> - <span class="widget-event-date"><?php echo event_date_display($event->start_date) ?></span></a>
  4.  
  5. By simply changing the event_date_display($event->start_date) to something like date('d-m-Y', $event->start_date) you can modify the actual format output.
  6.  
  7. So the following could work for you:
  8.  
  9. <li><a href="<?php echo $registration_url; ?>"><?php echo stripslashes_deep($event->event_name) ?> - <span class="widget-event-date"><?php echo date( 'F jS', strtotime($event->start_date) ) ?> - <?php echo date( 'jS Y', strtotime($event->end_date) ) ?></span></a></li>
RAW Paste Data