Here you can find the source of daysRoundingUp(Duration duration)
public static long daysRoundingUp(Duration duration)
//package com.java2s; //License from project: Open Source License import java.time.Duration; public class Main { public static long daysRoundingUp(Duration duration) { final long days = duration.toDays(); return duration.equals(Duration.ofDays(days)) ? days : days + 1; }// w w w.jav a 2 s.c o m }