---
title: "locale(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/date/relativeformatstyle/locale(_:)"
---

# locale(_:)

Modifies the relative date format style to use the specified locale.

## Declaration

```swift
func locale(_ locale: Locale) -> Date.RelativeFormatStyle
```

## Parameters

- `locale`: The locale to use when formatting relative dates.

## Return Value

Return Value A relative date format style with the provided locale.

## See Also

### Modifying a Relative Date Format Style

- [presentation](foundation/date/relativeformatstyle/presentation-swift.property.md)
- [unitsStyle](foundation/date/relativeformatstyle/unitsstyle-swift.property.md)
- [calendar](foundation/date/relativeformatstyle/calendar.md)
- [capitalizationContext](foundation/date/relativeformatstyle/capitalizationcontext.md)
- [locale](foundation/date/relativeformatstyle/locale.md)
