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

# getDateFilterTitleUsingTranslator()

- 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.64/libs/sdk-ui-filters/src/DateFilter/utils/Translations/DateFilterTitle.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).
> 

Gets the filter title using provided intl object.

**Signature:**

```typescript
getDateFilterTitleUsingTranslator: (filter: DateFilterOption, translator: IDateAndMessageTranslator, labelMode: DateFilterLabelMode, dateFormat?: string) => string
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| filter | [DateFilterOption](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.datefilteroption/index.md) |  |
| translator | [IDateAndMessageTranslator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.idateandmessagetranslator/index.md) |  |
| labelMode | [DateFilterLabelMode](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.datefilterlabelmode/index.md) |  |
| dateFormat | string | _(Optional)_ |

**Returns:**

string

Representation of the filter (e.g. "My preset", "From 2 weeks ago to 1 week ahead")

## Remarks

In addition to the base date filter representation, this function also decorates the title based on empty values handling:

- For "All time" with excluded empty values (`emptyValueHandling === "exclude"`), returns  `"All time except empty values"`. - For any non-"All time" option with included empty values (`emptyValueHandling === "include"`), appends  `", empty value"` to the base representation.

The dedicated "Empty values" preset is represented by its own title and is not further decorated.
