13 lines
No EOL
371 B
Kotlin
13 lines
No EOL
371 B
Kotlin
import java.time.LocalDateTime
|
|
import java.time.Month
|
|
import java.time.temporal.ChronoUnit
|
|
import java.time.temporal.Temporal
|
|
|
|
class Gigasecond(val dt: Temporal) {
|
|
val date: LocalDateTime = LocalDateTime.from(dt.plus(1000000000, ChronoUnit.SECONDS))
|
|
|
|
}
|
|
|
|
fun main(args: Array<String>) {
|
|
print(Gigasecond(LocalDateTime.of(2043, Month.JANUARY, 1, 1, 46, 40)).date)
|
|
} |