Skip to content

Instance MethodFoundationEssentials

day()

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
Modifies the ISO 8601 date format style to include the day in the formatted output.
func day() -> Date.ISO8601FormatStyle

Return Value

An ISO 8601 date format style modified to include the day.

Discussion

If month() isn’t included in the format and day() is, the format represents the day as the ordinal date. The default Date.ISO8601FormatStyle includes the day.