Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <dt>Date range</dt>
- <dd><?php
- // Find the start and end dates
- $recurrence = TribeEventsRecurrenceMeta::getRecurrenceMeta(get_the_ID());
- $final = isset($recurrence['recEnd']) ? $recurrence['recEnd'] : false;
- $start = get_post_meta(get_the_ID(), '_EventStartDate', true);
- // Do we have what we are looking for?
- if ($final !== false and !empty($start)) {
- // Format both dates
- $start = new DateTime($start);
- $start = $start->format(get_option('date_format'));
- $final = new DateTime($final);
- $final = $final->format(get_option('date_format'));
- // Display!
- echo "$start until $final";
- }
- ?></dd>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement