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

# locale

The locale to use when formatting the date and time components.

## Declaration

```swift
var locale: Locale
```

## Discussion

Discussion The default value is autoupdatingCurrent. If you set this property to nil, the formatter resets to using autoupdatingCurrent.

## See Also

### Modifying a Date Format Style

- [locale(_:)](foundation/date/formatstyle/locale(_:).md)
- [timeZone](foundation/date/formatstyle/timezone.md)
- [calendar](foundation/date/formatstyle/calendar.md)
- [capitalizationContext](foundation/date/formatstyle/capitalizationcontext.md)
