Hello dkinney,
Thanks for reaching out to us!
I took a look at that snippet and it looks like it can only be used to find the start date. To find the end date you’ll need to use the “_EventRecurrence” meta and access the “end” date there. Here is an example of the previous snippet modified to get the last event date for a recurring event.
<?php
$recurrence = get_post_meta( get_the_ID(), '_EventRecurrence', false );
foreach( $recurrence as $events ) {
$last_event = $events[end];
}
$final_date = date( get_option('date_format'), strtotime($last_event) );
echo "The last event takes place on $final_date.";
Let me know if this works for you.
Thanks!