Clock
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
struct Clock
struct Clock
s20FoundationEssentials4DateV0A20InternationalizationE11FormatStyleV6SymbolV12VerbatimHourV5ClockV
What are these?8AWA1
import FoundationEssentials
import FoundationInternationalization
struct VerbatimHour
struct Date
Date
represents a single point in time.
struct FormatStyle
Strategies for formatting a Date
.
struct Symbol
static func defaultDigits(clock: Date.FormatStyle.Symbol.VerbatimHour.Clock, hourCycle: Date.FormatStyle.Symbol.VerbatimHour.HourCycle) -> Date.FormatStyle.Symbol.VerbatimHour
Minimum digits to show the numeric hour. For example, 1
, 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
Numeric two-digit hour, zero padded if necessary. For example, 01
, 12
. Or 23
if using the twentyFourHour
clock.
struct HourCycle
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
init(from decoder: any Decoder) throws
static let twelveHour: Date.FormatStyle.Symbol.VerbatimHour.Clock
In a 12-hour clock system, the 24-hour day is divided into two periods, a.m. and p.m, and each period consists of 12 hours.
static let twentyFourHour: Date.FormatStyle.Symbol.VerbatimHour.Clock
In a 24-hour clock system, the day runs from midnight to midnight, dividing into 24 hours.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.