Java examples for java.time:LocalDate
get End LocalDate
//package com.java2s; import java.time.LocalDate; import java.time.temporal.ChronoUnit; public class Main { private static LocalDate getEndLocalDate(LocalDate targetLocalDate, LocalDate endLocalDate, int baseDate, ChronoUnit chronoUnit) { if (targetLocalDate.getMonth() == endLocalDate.getMonth() && targetLocalDate.getDayOfMonth() >= baseDate) { endLocalDate = endLocalDate.plus(1, chronoUnit); }//from ww w . j ava2 s . co m return endLocalDate; } }