public final class WorkingDaysToDaysConverter extends Object
| Modifier and Type | Method and Description |
|---|---|
Instant |
addWorkingDaysToInstant(Instant instant,
Duration workingDays) |
long |
convertWorkingDaysToDays(Instant startTime,
long numberOfDays) |
Instant |
getReferenceDate() |
static WorkingDaysToDaysConverter |
initialize()
Initializes the WorkingDaysToDaysConverter for the current day.
|
static WorkingDaysToDaysConverter |
initialize(Instant referenceDate)
Initializes the WorkingDaysToDaysConverter 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) |
Instant |
subtractWorkingDaysFromInstant(Instant instant,
Duration workingDays) |
String |
toString() |
public Instant getReferenceDate()
public static WorkingDaysToDaysConverter initialize()
SystemException - is thrown when the WorkingDaysToDaysConverter cannot be
initialized with the current Instant. Should never occur.public static WorkingDaysToDaysConverter 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 Instant addWorkingDaysToInstant(Instant instant, Duration workingDays)
public Instant subtractWorkingDaysFromInstant(Instant instant, Duration workingDays)
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.