Period getDays() example
Description
Period getDays()
gets the amount of days of this period.
This returns the days unit.
Syntax
getDays
has the following syntax.
public int getDays()
Example
The following example shows how to use getDays
.
import java.time.Period;
/* w w w .ja va 2 s. c o m*/
public class Main {
public static void main(String[] args) {
Period p = Period.ofMonths(1);
System.out.println(p.getDays());
}
}
The code above generates the following result.