public final class DaysToWorkingDaysConverter extends Object
| Modifier and Type | Method and Description |
|---|---|
long |
convertWorkingDaysToDays(Instant startTime,
long numberOfDays) |
Instant |
getReferenceDate() |
static DaysToWorkingDaysConverter |
initialize()
Initializes the DaysToWorkingDaysConverter for the current day.
|
static DaysToWorkingDaysConverter |
initialize(Instant referenceDate)
Initializes the DaysToWorkingDaysConverter for a referenceDate.
|
boolean |
isGermanHoliday(LocalDate date) |
boolean |
isHoliday(LocalDate date) |
boolean |
isWeekend(LocalDateTime dateToCheck) |
boolean |
isWorkingDay(long day,
Instant referenceDate) |
static void |
setCustomHolidays(List<LocalDate> holidays) |
static void |
setGermanPublicHolidaysEnabled(boolean germanPublicHolidaysEnabled) |
String |
toString() |
public Instant getReferenceDate()
public static DaysToWorkingDaysConverter initialize() throws InvalidArgumentException
InvalidArgumentException - thrown if columnHeaders is nullpublic static DaysToWorkingDaysConverter initialize(Instant referenceDate) throws InvalidArgumentException
referenceDate - a Instant that represents the current day of the tableInvalidArgumentException - thrown if columnHeaders or referenceDate is nullpublic static void setGermanPublicHolidaysEnabled(boolean germanPublicHolidaysEnabled)
public long convertWorkingDaysToDays(Instant startTime, long numberOfDays)
public boolean isWorkingDay(long day,
Instant referenceDate)
public boolean isWeekend(LocalDateTime dateToCheck)
public boolean isHoliday(LocalDate date)
public boolean isGermanHoliday(LocalDate date)
Copyright © 2020. All rights reserved.