LocalDateTime plusDays(long days)
returns a copy of this
LocalDateTime with the specified period in days added.
plusDays
has the following syntax.
public LocalDateTime plusDays(long days)
The following example shows how to use plusDays
.
import java.time.LocalDateTime; //from w w w. ja v a2s. co m public class Main { public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00); LocalDateTime t = a.plusDays(100); System.out.println(t); } }
The code above generates the following result.