struct MonthDayextension MonthDay : AutomationValue, Copyable, Decodable, Encodable, Equatable, Equatable, Escapable, Hashable, Hashable, Sendable, Sendable, StructDataRepresentableRepresents month and day.
This struct doesn’t include any time zone related information.
-
The month component.
Declaration
Swift
let month: LocalDate.Month -
The day component.
Declaration
Swift
let day: Int32 -
Initializes the
MonthDaywith the month and day.Declaration
Swift
init(month: LocalDate.Month, day: Int32) -
Initializes
MonthDaywith the trait decoder.Declaration
Swift
init(decoder: TraitDecoder) throws -
Encodes
MonthDayto the trait encoder.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Initializes a
MonthDayby converting the givendateComponents.Throws
whendateComponentshave at least anilmonth,day, or if they are not valid in the Gregorian calendar.Declaration
Swift
init(dateComponents: DateComponents) throws -
The
DateComponentsrepresentation of this month and day.Declaration
Swift
var dateComponents: DateComponents { get } -
Returns the field corresponding to the given field ID.
Declaration
Swift
static func structField(id: UInt32) -> (any Field)? -
Creates a new instance by decoding from the given decoder.
This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
Declaration
Swift
init(from decoder: any Decoder) throws