    struct YearMonth

    extension YearMonth : https://developers.home.google.com/reference/swift/GoogleHomeSDK/GoogleHomeSDK.html#/s:13GoogleHomeSDK15AutomationValueP, Comparable, Copyable, Copyable, Decodable, Encodable, Equatable, Equatable, Equatable, Escapable, Escapable, Hashable, Hashable, Sendable, Sendable, SendableMetatype, SendableMetatype, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/StructDataRepresentable.html

Represents year and month.

This struct doesn't include any time zone related information.
- `


  ### [year](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV4years5Int32Vvp)


  ` The year component.

  #### Declaration

  Swift

      let year: Int32

- `


  ### [month](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV5monthAA9LocalDateV0E0Ovp)


  ` The month component.

  #### Declaration

  Swift

      let month: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/LocalDate.html.Month

- `


  ### [init(year:month:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV4year5monthACs5Int32V_AA9LocalDateV0E0Otcfc)


  ` Initializes the `YearMonth` with the year, month.

  #### Declaration

  Swift

      init(year: Int32, month: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/LocalDate.html.Month)

- `


  ### [init(decoder:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV7decoderAcA12TraitDecoderV_tKcfc)


  ` Initializes `YearMonth` with the trait decoder.

  #### Declaration

  Swift

      init(decoder: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/TraitDecoder.html) throws

- `


  ### [encode(with:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV6encode4withyAA12TraitEncoderC_tKF)


  ` Encodes `YearMonth` to the trait encoder.

  #### Declaration

  Swift

      func encode(with encoder: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/TraitEncoder.html) throws

- `


  ### [init(dateComponents:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV14dateComponentsAC10Foundation04DateG0V_tKcfc)


  ` Initializes a `YearMonth` by converting the given `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth.html#/s:13GoogleHomeSDK9YearMonthV14dateComponents10Foundation04DateG0Vvp`.
  Throws
  when `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth.html#/s:13GoogleHomeSDK9YearMonthV14dateComponents10Foundation04DateG0Vvp` have at least a `nil` `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth.html#/s:13GoogleHomeSDK9YearMonthV4years5Int32Vvp`, `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth.html#/s:13GoogleHomeSDK9YearMonthV5monthAA9LocalDateV0E0Ovp`, or if they are not valid in the Gregorian calendar.

  #### Declaration

  Swift

      init(dateComponents: DateComponents) throws

  #### Parameters

  |---|---|
  | ` dateComponents ` | The date components with the `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth.html#/s:13GoogleHomeSDK9YearMonthV4years5Int32Vvp`, `https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth.html#/s:13GoogleHomeSDK9YearMonthV5monthAA9LocalDateV0E0Ovp` to use. |

- `


  ### [dateComponents](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV14dateComponents10Foundation04DateG0Vvp)


  ` The `DateComponents` representation of this year month.

  #### Declaration

  Swift

      var dateComponents: DateComponents { get }

- `


  ### [StructFields](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth/StructFields.html)


  ` Undocumented

  #### Declaration

  Swift

      enum StructFields

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth.html.StructFields : Equatable, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Field.html, Hashable, RawRepresentable, Sendable, SendableMetatype

- `


  ### [structField(id:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV11structField2idAA0G0_pSgs6UInt32V_tFZ)


  ` Returns the field corresponding to the given field ID.

  #### Declaration

  Swift

      static func structField(id: UInt32) -> (any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Field.html)?

- `


  ### [\<(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV1loiySbAC_ACtFZ)


  ` 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 `Comparable` protocol. The
  remainder of the relational operator functions are implemented by the
  standard library for any type that conforms to `Comparable`.

  #### Declaration

  Swift

      static func < (lhs: YearMonth, rhs: YearMonth) -> Bool

  #### Parameters

  |---|---|
  | ` lhs ` | A value to compare. |
  | ` rhs ` | Another value to compare. |

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV2eeoiySbAC_ACtFZ)


  ` Returns a Boolean value indicating whether two values are equal.

  Equality is the inverse of inequality. For any values `a` and `b`,
  `a == b` implies that `a != b` is `false`.

  #### Declaration

  Swift

      static func == (lhs: YearMonth, rhs: YearMonth) -> Bool

  #### Parameters

  |---|---|
  | ` lhs ` | A value to compare. |
  | ` rhs ` | Another value to compare. |

- `


  ### [init(from:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/YearMonth#/s:13GoogleHomeSDK9YearMonthV4fromACs7Decoder_p_tKcfc)


  ` 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