Defensive clone. Applied to every result before it leaves the engine so callers that mutate returned Dates cannot corrupt cached schedule state.
Direction-aware date comparator. Returns a binary comparator whose polarity depends on
dir: for "next" it answers "is a after b?", for "prev" it flips to "is b
after a?". Lets the iteration engine run one loop body for both directions.
Sort in place, ascending. When zeroIsLast is set, a leading 0 is moved to the
end which the parser encodes "the maximum extent" as 0 for some periods (e.g. day-of-month
31 or 0 depending on whether last was applied).
Advance each startsArr[i] past startDate. Falls back to tickSafe when a DST
transition makes start(tick(...)) land on the same instant again, which would
otherwise loop forever.
Dispatch map the schedule compiler indexes by direction string
(next / prev / nextInvalid / prevInvalid / sort) at runtime.
Generated using TypeDoc
Internal helpers used by CompiledConstraintImpl and CompiledScheduleImpl at runtime. Pure static utilities kept separate from CalendarIntervalParser so the parser class stays focused on its public API surface.
Engine/util/calendar_interval_parser/IntervalParseHelpers