LocalDateTime constructor

LocalDateTime(
  1. int year,
  2. int month,
  3. int day,
  4. int hour,
  5. int minute,
  6. int second, {
  7. int? ms,
  8. int? us,
  9. int? ns,
  10. CalendarSystem? calendar,
})

Initializes a new instance of LocalDateTime.

  • year: The year. This is the 'absolute year', so, for the ISO calendar, a value of 0 means 1 BC, for example.
  • month: The month of year.
  • day: The day of month.
  • hour: The hour.
  • minute: The minute.
  • second: The second.
  • usns: The millisecond or microsecond or nanosecond of the second.
  • calendar: The calendar. ISO calendar default.

Returns: The resulting date/time.

  • ArgumentOutOfRangeException: The parameters do not form a valid date/time.

see: LocalTime for potential future API change

Implementation

LocalDateTime(int year, int month, int day, int hour, int minute, int second, {int? ms, int? us, int? ns, CalendarSystem? calendar})
    : this.localDateAtTime(LocalDate(year, month, day, calendar), LocalTime(hour, minute, second, ms:ms, us:us, ns:ns));