month
Returns the month (Month) component of the date.
Samples
import kotlinx.datetime.*
import kotlinx.datetime.format.*
import kotlin.random.*
import kotlin.test.*
fun main() {
//sampleStart
// Getting the month
for (month in Month.entries) {
check(LocalDate(2024, month, 16).month == month)
}
//sampleEnd
}