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

component2

inline operator fun LocalDate.component2(): Month

Return the Month of this LocalDate.

This method allows to use destructuring declarations when working with dates, for example:

val (year, month, day) = myLocalDate

See Also

LocalDate.getMonth