Java LocalDate Calculate isInPeriod(LocalDate subject, LocalDate start, LocalDate end)

Here you can find the source of isInPeriod(LocalDate subject, LocalDate start, LocalDate end)

Description

is In Period

License

Open Source License

Declaration

public static boolean isInPeriod(LocalDate subject, LocalDate start, LocalDate end) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.time.*;

public class Main {
    public static boolean isInPeriod(LocalDate subject, LocalDate start, LocalDate end) {
        return (subject.isAfter(start) || subject.isEqual(start))
                && (subject.isBefore(end) || subject.isEqual(end));
    }/*from w  ww.  ja  v  a2  s .c o m*/
}

Related

  1. isActual(LocalDate before, LocalDate after)
  2. isAnyLocalDate(Object obj)
  3. isBankHoliday(List bankHolidays, LocalDate date)
  4. isDayOfWeek(LocalDate d, DayOfWeek dow)
  5. isEqual(LocalDate date1, LocalDate date2)
  6. isLess(@Nonnull final LocalDate aDate1, @Nonnull final LocalDate aDate2)
  7. isLocalDateAD(LocalDate date)
  8. isLocalDateOrDateTimeType(Class type)
  9. isNotNullAndAfter(LocalDate localDate1, LocalDate localDate2)