LocalDateTime constructor
LocalDateTime(})
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.us
ns
: 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));