Returns a copy of this LocalDateTime with the specified number of minutes added.
package com.logicbig.example.localdatetime;
import java.time.LocalDateTime;
import java.time.Month;
public class PlusMinutesExample {
public static void main (String... args) {
LocalDateTime d = LocalDateTime.of(2016, Month.APRIL, 1,
22, 20, 30);
LocalDateTime d2 = d.plusMinutes(1000000);
System.out.println(d2);
d2 = d.plusMinutes(-1000000);
System.out.println(d2);
}
}
Output
2018-02-25T09:00:30
2014-05-08T11:40:30