java.time.LocalDate.until(Temporal endExclusive, TemporalUnit unit) java.time.LocalDate.until() 方法示例 java.time.LocalDate.with() 方法示例 java.time.LocalDate.until(Temporal endExclusive, TemporalUnit unit) package com.codingdict; import java.time.LocalDate; import java.time.temporal.ChronoUnit; public class LocalDateDemo { public static void main(String[] args) { LocalDate date = LocalDate.parse("2017-01-03"); LocalDate date1 = LocalDate.now(); System.out.println(date.until(date1, ChronoUnit.DAYS)); } } java.time.LocalDate.until() 方法示例 java.time.LocalDate.with() 方法示例