struct YearMonthextension YearMonth : AutomationValue, Comparable, Copyable, Copyable, Decodable, Encodable, Equatable, Equatable, Equatable, Escapable, Escapable, Hashable, Hashable, Sendable, Sendable, StructDataRepresentableRepresents year and month.
This struct doesn’t include any time zone related information.
- 
                  
                  The year component. DeclarationSwift let year: Int32
- 
                  
                  The month component. DeclarationSwift let month: LocalDate.Month
- 
                  
                  Initializes the YearMonthwith the year, month.DeclarationSwift init(year: Int32, month: LocalDate.Month)
- 
                  
                  Initializes YearMonthwith the trait decoder.DeclarationSwift init(decoder: TraitDecoder) throws
- 
                  
                  Encodes YearMonthto the trait encoder.DeclarationSwift func encode(with encoder: TraitEncoder) throws
- 
                  
                  Initializes a YearMonthby converting the givendateComponents.Throws whendateComponentshave at least anilyear,month, or if they are not valid in the Gregorian calendar.DeclarationSwift init(dateComponents: DateComponents) throws
- 
                  
                  The DateComponentsrepresentation of this year month.DeclarationSwift var dateComponents: DateComponents { get }
- 
                  
                  Returns the field corresponding to the given field ID. DeclarationSwift static func structField(id: UInt32) -> (any Field)?
- 
                  
                  Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument. This function is the only requirement of the Comparableprotocol. The remainder of the relational operator functions are implemented by the standard library for any type that conforms toComparable.DeclarationSwift static func < (lhs: YearMonth, rhs: YearMonth) -> BoolParameterslhsA value to compare. rhsAnother value to compare. 
- 
                  
                  Returns a Boolean value indicating whether two values are equal. Equality is the inverse of inequality. For any values aandb,a == bimplies thata != bisfalse.DeclarationSwift static func == (lhs: YearMonth, rhs: YearMonth) -> BoolParameterslhsA value to compare. rhsAnother value to compare. 
- 
                  
                  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. DeclarationSwift init(from decoder: any Decoder) throws