plus Year
The YearMonth 12 months 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).plusYear() == YearMonth(2024, Month.JANUARY))
//sampleEnd
}