LocalDateTime.of
- LocalDateTime of(int year, Month month, int dayOfMonth, int hour, int minute)
- LocalDateTime of(int year, Month month, int dayOfMonth, int hour, int minute, int second)
- LocalDateTime of(int year, Month month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond)
- LocalDateTime of(int year, int month, int dayOfMonth, int hour, int minute)
- LocalDateTime of(int year, int month, int dayOfMonth, int hour, int minute, int second)
- LocalDateTime of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond)
- LocalDateTime of(LocalDate date, LocalTime time)
Obtains an instance of {@code LocalDateTime} from year, month, day, hour, minute and second, setting the nanosecond to zero. !(p) This returns a {@code LocalDateTime} with the specified year, month, day-of-month, hour, minute and second. The day must be valid for the year and month, otherwise an exception will be thrown. The nanosecond field will be set to zero.
@param year the year to represent, from MIN_YEAR to MAX_YEAR @param month the month-of-year to represent, from 1 (January) to 12 (December) @param dayOfMonth the day-of-month to represent, from 1 to 31 @param hour the hour-of-day to represent, from 0 to 23 @param minute the minute-of-hour to represent, from 0 to 59 @param second the second-of-minute to represent, from 0 to 59 @return the local date-time, not null @throws DateTimeException if the value of any field is _out of range, or if the day-of-month is invalid for the month-year