In Java, plus(...) returns a new LocalDateTime that is later than the original. There are two versions. One takes a number and a TemporalUnit, such as plus(2, ChronoUnit.HOURS). The other takes a TemporalAmount, which is a Duration or a Period.
The methods plusDays(), plusHours() and the others are shortcuts. plus() reaches every unit, including weeks, decades, and half-days.
An instance method of java.time.LocalDateTime (since Java 8): call it on a LocalDateTime object. Add import java.time.LocalDateTime; at the top of your file. It comes from Temporal, which LocalDateTime implements.
Syntax
Pass a number and a unit, or pass a Duration or Period.
Java
LocalDateTime dt = LocalDateTime.of(2026, 3, 15, 10, 30);
LocalDateTime a = dt.plus(1, ChronoUnit.WEEKS); // 2026-03-22T10:30
LocalDateTime b = dt.plus(Duration.ofMinutes(90)); // 2026-03-15T12:00
LocalDateTime c = dt.plus(Period.ofMonths(1)); // 2026-04-15T10:30
Call
What it does
dt.plus(n, unit)
Adds n of a ChronoUnit, such as WEEKS or HOURS.
dt.plus(duration)
Adds a Duration, which is an amount of time in seconds.
dt.plus(period)
Adds a Period, which is an amount in years, months, and days.
dt.plusDays(n)
The shortcut for plus(n, ChronoUnit.DAYS).
The original is never changed. plus() returns a new LocalDateTime.
Library declarations
Java
// java.time.LocalDateTime
public LocalDateTime plus(long amountToAdd, TemporalUnit unit)
public LocalDateTime plus(TemporalAmount amountToAdd)
Parameters
Parameter
Description
amountToAdd (long)
The number of units to add. It can be negative.
unit (TemporalUnit)
The unit, such as ChronoUnit.MINUTES.
amountToAdd (TemporalAmount)
A Duration or a Period. Use this version without the unit.