Period ofDays(int days)
creates a Period representing
a number of days.
ofDays
has the following syntax.
public static Period ofDays(int days)
The following example shows how to use ofDays
.
import java.time.Period; /*ww w .j a va 2 s . co m*/ public class Main { public static void main(String[] args) { Period p = Period.ofDays(12); System.out.println(p.toString()); } }
The code above generates the following result.