Java examples for java.time:LocalDate
get Start LocalDate
//package com.java2s; import java.time.LocalDate; import java.time.temporal.ChronoUnit; public class Main { private static LocalDate getStartLocalDate(LocalDate targetLocalDate, LocalDate startLocalDate, int baseDate, ChronoUnit chronoUnit) { if (targetLocalDate.getMonth() == startLocalDate.getMonth() && targetLocalDate.getDayOfMonth() < baseDate) { startLocalDate = startLocalDate.minus(1, chronoUnit); }/*www .j a v a 2 s . com*/ return startLocalDate; } }