Period minusDays(long daysToSubtract)
returns a copy of this period with the specified days subtracted.
minusDays
has the following syntax.
public Period minusDays(long daysToSubtract)
The following example shows how to use minusDays
.
import java.time.Period; // w w w . j av a 2s .c o m public class Main { public static void main(String[] args) { Period p = Period.ofMonths(1); Period l = p.minusDays(10); System.out.println(l); } }
The code above generates the following result.