eo_get_event_schedule
eo_get_event_schedule( $post_id )
Gets schedule meta from the database (post meta) Datetimes are converted to DateTime objects, in blog's currenty timezone
Event details include
schedule => (custom | once | daily | weekly | monthly | yearly) -- specifies the recurrence pattern
schedule_meta =>
- For monthly schedules,
- (string) BYMONTHDAY=XX to repeat on XXth day of month, e.g. BYMONTHDAY=01 to repeat on the first of every month.
- (string) BYDAY=ND. N= 1|2|3|4|-1 (first, second, third, fourth, last). D is day of week SU|MO|TU|WE|TH|FR|SA. E.g. BYDAY=2TU (repeat on second tuesday)
- For weekly schedules,
- (array) Days to repeat on: (SU,MO,TU,WE,TH,FR,SA). e.g. set to array('SU','TU') to repeat on Tuesdays & Sundays.
occurs_by - For use with monthly schedules: how the event recurs: BYDAY or BYMONTHDAY
frequency => (int) positive integer, sets frequency of recurrence (every 2 days, or every 3 days etc)
all_day => 1 if its an all day event, 0 if not
start => start date (of first occurrence) as a datetime object
end => end date (of first occurrence) as a datetime object
until => For recurring events, the date they repeat until. Note that this may not be equal to schedule_last if
dates are included/excluded.
schedule_last => START date of last occurrence as a datetime object
include => array of datetime objects to include in the schedule
exclude => array of datetime objects to exclude in the schedule
Parameters
int
|
$post_id |
- The post ID of the event
|
Return value
array
|
event schedule details
|
Hooks