Java Time/LocalDateTime (Java 8): Add Days or Add Minutes

May 17, 2019


LocalDateTime now =
now = now.addDays(1)

NOTE: Java 8 Date Time is immutable, thus we need to perform the reassignment.

LocalTime now =
now = now.plusMinutes(1)


var now =
now = now.plusDays(1)
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.