core-ktx / androidx.time / java.time.YearMonth / component2

component2

inline operator fun YearMonth.component2(): Month

Return the Month component of this YearMonth.

This method allows to use destructuring declarations when working with year-months, for example:

val (year, month) = myYearMonth

See Also

YearMonth.getMonth