Type MethodFoundationInternationalization
twoDigits(clock:hourCycle:)
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Numeric two-digit hour, zero padded if necessary. For example,
01, 12. Or 23 if using the twentyFourHour clock.static func twoDigits(clock: Date.FormatStyle.Symbol.VerbatimHour.Clock, hourCycle: Date.FormatStyle.Symbol.VerbatimHour.HourCycle) -> Date.FormatStyle.Symbol.VerbatimHour
Discussion
Note
This format does not take user’s locale preferences into account. Consider using defaultDigits if applicable.