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

# formatDateRangeParameterPeriod()

- Package: [@gooddata/sdk-ui-filters](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/index.md)
- Kind: function
- Stability: beta
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.71/libs/sdk-ui-filters/src/DateFilter/utils/Translations/DateRangeParameterPeriod.ts

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Names the range of a date range parameter's period, such as "August 2025 – August 2026".

**Signature:**

```typescript
formatDateRangeParameterPeriod: (period: IDateRangeParameterPeriod, translator: IDateAndMessageTranslator, dateFormat?: string, weekStart?: WeekStart) => string | undefined
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| period | [IDateRangeParameterPeriod](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.idaterangeparameterperiod/index.md) | the period of a date range parameter |
| translator | [IDateAndMessageTranslator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.idateandmessagetranslator/index.md) | translator with the messages of `@gooddata/sdk-ui` |
| dateFormat | string | _(Optional)_ date-fns format of a day, defaults to "MM/dd/yyyy" |
| weekStart | [WeekStart](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.weekstart/index.md) | _(Optional)_ the first day of a week, defaults to Sunday |

**Returns:**

string &#124; undefined

the range, or undefined when the period has neither end

## Remarks

The range reads as a static period of the date filter: years, quarters and months by their names, and weeks by their days, which depend on `weekStart`. Days are written in `dateFormat` in the translator's locale, with the time for hours, minutes and seconds. A range within one day writes the day once, such as "08/14/2025, 09:00 – 17:59", and a range that covers whole days writes only the days. An hour ends with its last minute. Days and times are wall-clock values, written as they are in every time zone. A period with one end reads "From August 2025" or "To August 2026". An end that is not a valid literal of the granularity is written as it is.
