belongsToCalendar()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Whether a granularity is usable under the given calendar — its own (standard/fiscal) granularities plus the shared ones (week/date/time/generic).
belongsToCalendar: (g: string | undefined, calendar: Exclude<CalendarAffinity, "shared">) => boolean
Parameters
Parameter | Type | Description |
|---|---|---|
g | string | undefined | |
calendar | Exclude<CalendarAffinity, “shared”> |
Returns
boolean
Remarks
Mirrors what a single calendar “tab” offers, so a merged result (e.g. standard + fiscal) can be split into standard-usable and fiscal-usable in one pass. shared granularities satisfy both calendars.