Period plusDays(long daysToAdd)
returns a copy of this period with the specified days added.
plusDays
has the following syntax.
public Period plusDays(long daysToAdd)
The following example shows how to use plusDays
.
import java.time.Period; /*from w w w .ja va 2 s .c om*/ public class Main { public static void main(String[] args) { Period p = Period.ofMonths(1); Period l = p.plusDays(12); System.out.println(l); } }
The code above generates the following result.