feat: identify continuous calendar segments

This commit is contained in:
Keith Solomon
2026-07-30 14:02:36 -05:00
parent f84b6e8fbf
commit 0b3c82ad7b
2 changed files with 18 additions and 6 deletions
+11
View File
@@ -81,6 +81,17 @@ function aa_events_occurrence_intersects_range( array $occurrence, DateTimeImmut
return null !== $occurrence_start && null !== $occurrence_end && $occurrence_end >= $occurrence_start && $end >= $start && $occurrence_start <= $end && $occurrence_end >= $start;
}
/**
* Build a stable key for an event occurrence within a calendar render.
*
* @param mixed $post_id Event post ID.
* @param mixed $occurrence_index Zero-based occurrence index for the event.
* @return string
*/
function aa_events_calendar_occurrence_key( $post_id, $occurrence_index ) {
return (int) $post_id . '-' . (int) $occurrence_index;
}
/**
* Clip an occurrence to a month and split it at week boundaries.
*