isDistantFuture

Returns true if the instant is Instant.DISTANT_FUTURE or later.

Samples

import kotlinx.datetime.*
import kotlinx.datetime.format.*
import kotlin.random.*
import kotlin.test.*
import kotlin.time.Duration.Companion.hours
fun main() { 
   //sampleStart 
   // Checking if an instant is so far in the future that it's probably irrelevant
val currentInstant = Clock.System.now()
val tenThousandYearsLater = currentInstant.plus(10_000, DateTimeUnit.YEAR, TimeZone.UTC)
check(!tenThousandYearsLater.isDistantFuture)
check(Instant.DISTANT_FUTURE.isDistantFuture) 
   //sampleEnd
}