java.time.LocalDate.with() 方法示例 java.time.LocalDate.until(Temporal endExclusive, TemporalUnit unit) java.time.LocalDate.with(TemporalField field, long newValue) java.time.LocalDate.with() 方法示例 package com.codingdict; import java.time.LocalDate; import java.time.Month; import java.time.temporal.TemporalAdjusters; public class LocalDateDemo { public static void main(String[] args) { LocalDate date = LocalDate.parse("2017-01-03"); LocalDate result = date.with(Month.JULY).with(TemporalAdjusters.lastDayOfMonth()); System.out.println(result); } } java.time.LocalDate.until(Temporal endExclusive, TemporalUnit unit) java.time.LocalDate.with(TemporalField field, long newValue)