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

# ISO8601Format(_:)

Generates a locale-aware string representation of a date using the ISO 8601 date format.

## Declaration

```swift
func ISO8601Format(_ style: Date.ISO8601FormatStyle = .init()) -> String
```

## Parameters

- `style`: A customized doc://com.apple.foundation/documentation/Foundation/Date/ISO8601FormatStyle to apply. By default, the method applies an unmodified ISO 8601 format style.

## Return Value

Return Value A string, formatted according to the specified style.

## Discussion

Discussion Calling this method is equivalent to passing a Date.ISO8601FormatStyle to a date’s formatted() method.

## See Also

### Formatting a Date

- [formatted()](foundation/date/formatted().md)
- [formatted(date:time:)](foundation/date/formatted(date:time:).md)
- [formatted(_:)](foundation/date/formatted(_:).md)
- [Date.FormatStyle](foundation/date/formatstyle.md)
- [Date.RelativeFormatStyle](foundation/date/relativeformatstyle.md)
- [Date.IntervalFormatStyle](foundation/date/intervalformatstyle.md)
- [Date.ISO8601FormatStyle](foundation/date/iso8601formatstyle.md)
