Skip to content

Instance MethodFoundationInternationalization

hour(_:)

iOS 18.0+ iPadOS 18.0+ Mac Catalyst 18.0+ macOS 15.0+ tvOS 18.0+ watchOS 11.0+
Change the representation of the hour in the format.
func hour(_ format: Date.FormatStyle.Symbol.Hour = .defaultDigits(amPM: .abbreviated)) -> Date.FormatStyle.Attributed

Parameters

format

Set the symbol representation or pass nil to remove it.