Duration ofDays(long days)
creates a Duration
representing a number of standard 24 hour days.
ofDays
has the following syntax.
public static Duration ofDays(long days)
The following example shows how to use ofDays
.
import java.time.Duration; public class Main { public static void main(String[] args) { Duration duration = Duration.ofDays(10); System.out.println(duration); } }
The code above generates the following result.