public final class WorkingDaysToDaysConverter extends Object
| Modifier and Type | Method and Description |
|---|---|
Instant |
addWorkingDaysToInstant(Instant instant,
Duration workingDays) |
long |
convertWorkingDaysToDays(Instant startTime,
long numberOfDays) |
long |
convertWorkingDaysToDays(Instant startTime,
long numberOfDays,
pro.taskana.common.internal.util.WorkingDaysToDaysConverter.ZeroDirection zeroDirection) |
Instant |
getReferenceDate() |
boolean |
hasWorkingDaysInBetween(Instant left,
Instant right) |
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 |
setCorpusChristiEnabled(boolean corpusChristiEnabled) |
static void |
setCustomHolidays(List<CustomHoliday> 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 static void setCorpusChristiEnabled(boolean corpusChristiEnabled)
public static void setCustomHolidays(List<CustomHoliday> holidays)
public long convertWorkingDaysToDays(Instant startTime, long numberOfDays)
public long convertWorkingDaysToDays(Instant startTime, long numberOfDays, pro.taskana.common.internal.util.WorkingDaysToDaysConverter.ZeroDirection zeroDirection)
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.