> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# belongsToCalendar()

- Package: [@gooddata/sdk-model](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/index.md)
- Kind: function
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-model/src/base/granularityRegistry.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Whether a granularity is usable under the given calendar — its own (`standard`/`fiscal`) granularities plus the `shared` ones (week/date/time/generic).

**Signature:**

```typescript
belongsToCalendar: (g: string | undefined, calendar: Exclude<CalendarAffinity, "shared">) => boolean
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| g | string \| undefined |  |
| calendar | Exclude&lt;[CalendarAffinity](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.calendaraffinity/index.md), "shared"&gt; |  |

**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.
