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

# excludeCurrentPeriodFromRange()

- Package: [@gooddata/sdk-ui-filters](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/index.md)
- Kind: function
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-filters/src/DateFilter/utils/PeriodExclusion.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).
> 

The numeric core of exclude-current-period: a current-period-ending range shifts back by one period; anything else is returned unchanged (exclusion does not apply). This is what the filter bar persists — no flag, just the shifted offsets.

**Signature:**

```typescript
excludeCurrentPeriodFromRange: (range: {
    from: number;
    to: number;
}, excludeCurrentPeriod: boolean) => {
    from: number;
    to: number;
}
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| range | { from: number; to: number; } |  |
| excludeCurrentPeriod | boolean |  |

**Returns:**

{ from: number; to: number; }
