plus Month
The YearMonth one month later.
Throws
if the result exceeds the boundaries of YearMonth.
Samples
import kotlinx.datetime.*
import kotlinx.datetime.format.*
import kotlinx.datetime.onDay
import kotlin.test.*
fun main() {
//sampleStart
check(YearMonth(2023, Month.JANUARY).plusMonth() == YearMonth(2023, Month.FEBRUARY))
//sampleEnd
}