Function: capSeriesRuleBefore()
function capSeriesRuleBefore(template: SeriesTemplate, splitInstant: Date): CapSeriesRuleResult;Defined in: shared/bookings/series-template.ts:196
THE one rule-capping implementation (spec §6.8 "this and following"):
cap template.recurrenceRule so its last occurrence falls strictly BEFORE
splitInstant.
COUNTrule → lowerCOUNTto the number of occurrences before the split (neverCOUNT+UNTIL, RFC-illegal). Needs the template's DTSTART to count occurrences.UNTIL/ unbounded rule → cap withUNTIL = splitInstant − 1s(UNTILis inclusive).
Parameters
| Parameter | Type |
|---|---|
template | SeriesTemplate |
splitInstant | Date |