コード例 #1
0
 function eventbrite_format_time()
 {
     $start = eventbrite_event_start()->local;
     $end = eventbrite_event_end()->local;
     $event_time = sprintf('%s <br> %s - %s <br> %s - %s', esc_html(mysql2date('l', $start)) . 's', esc_html(mysql2date('g:i A', $start)), esc_html(mysql2date('g:i A', $end)), esc_html(mysql2date('F j', $start)), esc_html(mysql2date('F j Y', $end)));
     return $event_time;
 }
コード例 #2
0
 /**
  * Determine if an event spans multiple calendar days.
  *
  * @return bool True if start and end date are the same, false otherwise.
  */
 function eventbrite_is_multiday_event()
 {
     // Set date variables for comparison.
     $start_date = mysql2date('Ymd', eventbrite_event_start()->utc);
     $end_date = mysql2date('Ymd', eventbrite_event_end()->utc);
     // Return true if they're different, false otherwise.
     return $start_date !== $end_date;
 }