Java tutorial
import java.time.Period; import java.time.temporal.ChronoUnit; public class Main { public static void main(String[] args) { Period p = Period.ofMonths(1); System.out.println(p.get(ChronoUnit.DAYS)); } }