months
The length of this unit in months.
Samples
import kotlinx.datetime.*
import kotlin.test.*
import kotlin.time.Duration.Companion.hours
fun main() {
//sampleStart
// Constructing various month-based measurement units
val halfYear = DateTimeUnit.MonthBased(months = 6)
check(halfYear.months == 6)
check(halfYear == DateTimeUnit.QUARTER * 2)
check(halfYear == DateTimeUnit.MONTH * 6)
//sampleEnd
}