LocalDateTime

expect fun LocalDateTime(    year: Int,     monthNumber: Int,     dayOfMonth: Int,     hour: Int,     minute: Int,     second: Int = 0,     nanosecond: Int = 0)

Constructs a LocalDateTime instance from the given date and time components.

The components monthNumber and dayOfMonth are 1-based.

The supported ranges of components:

  • year the range is platform dependent, but at least is enough to represent dates of all instants between Instant.DISTANT_PAST and Instant.DISTANT_FUTURE

  • monthNumber1..12

  • dayOfMonth1..31, the upper bound can be less, depending on the month

  • hour0..23

  • minute0..59

  • second0..59

  • nanosecond0..999_999_999

Throws

if any parameter is out of range, or if dayOfMonth is invalid for the given monthNumber and year.


expect fun LocalDateTime(    year: Int,     month: Month,     dayOfMonth: Int,     hour: Int,     minute: Int,     second: Int = 0,     nanosecond: Int = 0)

Constructs a LocalDateTime instance from the given date and time components.

The supported ranges of components:

  • year the range is platform dependent, but at least is enough to represent dates of all instants between Instant.DISTANT_PAST and Instant.DISTANT_FUTURE

  • month all values of the Month enum

  • dayOfMonth1..31, the upper bound can be less, depending on the month

  • hour0..23

  • minute0..59

  • second0..59

  • nanosecond0..999_999_999

Throws

if any parameter is out of range, or if dayOfMonth is invalid for the given month and year.


expect fun LocalDateTime(date: LocalDate, time: LocalTime)

Constructs a LocalDateTime instance by combining the given date and time parts.

actual fun LocalDateTime(    year: Int,     monthNumber: Int,     dayOfMonth: Int,     hour: Int,     minute: Int,     second: Int,     nanosecond: Int)
actual fun LocalDateTime(    year: Int,     month: Month,     dayOfMonth: Int,     hour: Int,     minute: Int,     second: Int,     nanosecond: Int)
actual fun LocalDateTime(date: LocalDate, time: LocalTime)
actual fun LocalDateTime(    year: Int,     monthNumber: Int,     dayOfMonth: Int,     hour: Int,     minute: Int,     second: Int,     nanosecond: Int)
actual fun LocalDateTime(date: LocalDate, time: LocalTime)
actual fun LocalDateTime(    year: Int,     monthNumber: Int,     dayOfMonth: Int,     hour: Int,     minute: Int,     second: Int,     nanosecond: Int)
actual fun LocalDateTime(    year: Int,     month: Month,     dayOfMonth: Int,     hour: Int,     minute: Int,     second: Int,     nanosecond: Int)
actual fun LocalDateTime(date: LocalDate, time: LocalTime)