java.time.Period.minusDays() 方法示例


java.time.Period.minusDays() 方法示例

package com.codingdict;

import java.time.Period;

public class PeriodDemo {
   public static void main(String[] args) {

      Period period = Period.ofDays(5);
      System.out.println(period.getDays());
      Period period1 = period.minusDays(3);
      System.out.println(period1.getDays());
   }
}