---
title: locale
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/dateintervalformatter/locale
---

# locale

The locale to use when formatting date and time values.

## Declaration

```swift
var locale: Locale! { get set }
```

## Discussion

Discussion The default value of this property is the current user’s locale, which is accessible from the current method of NSLocale. You can change this value to a different locale to generate strings based on that locale.

## See Also

### Configuring the Formatter Options

- [dateStyle](foundation/dateintervalformatter/datestyle.md)
- [timeStyle](foundation/dateintervalformatter/timestyle.md)
- [dateTemplate](foundation/dateintervalformatter/datetemplate.md)
- [calendar](foundation/dateintervalformatter/calendar.md)
- [timeZone](foundation/dateintervalformatter/timezone.md)
