eo_format_event_occurrence
since 3.0.0
eo_format_event_occurrence( $event_id = false, $occurrence_id = false, $date_format = false, $time_format = false, $seperator = ' – ', $microdata = true )
Formats the start/end date/time of an occurrence.
This function uses date format for all-day events and appends the time format for all
other events. It then splits this format intelligently by inserting the $seperator
where the formatted start/end datetimes differ.
It will optionally wrap the start & end dates with microdata.
Note: for all-day, non-multi-day events, this will return just the start date.
Parameters
int
|
$event_id = false |
The event ID. Defaults to the current event if not provided.
|
int
|
$occurrence_id = false |
The occurrence ID. Defaults to the current occurrence if not provided.
|
string
|
$date_format = false |
How to format the date part of the occurrence's datetime.
|
string
|
$time_format = false |
How to format the time part of the occurrence's datetime.
|
string
|
$seperator = ' – ' |
A string used to seperate differing parts of the formatted start/end datetimes.
|
bool
|
$microdata = true |
Whether to wrap the formatted start/end datetimes in microdata
|
Return value
string|\dateTime
|
The formatted occurrence start/end date range
|
Changelog
Resources