public class DefaultWorkCalendar extends java.lang.Object implements WorkCalendar
Constructor and Description |
---|
DefaultWorkCalendar() |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
addWorkTime(java.util.Date date,
long afterSeconds)
Returns the new date according to the schedule.
|
java.time.ZonedDateTime |
addWorkTime(java.time.ZonedDateTime date,
long afterSeconds)
Returns the new date according to the schedule.
|
int |
getId() |
java.util.Date |
getNextWorkDateTime(java.util.Date date)
Returns the new date according to the schedule.
|
java.time.ZonedDateTime |
getNextWorkDateTime(java.time.ZonedDateTime date)
Returns the new date according to the schedule.
|
long |
getWorkTimeBetweenDates(java.util.Date start,
java.util.Date finish)
Counts time according to a schedule between dates.
|
long |
getWorkTimeBetweenDates(java.time.ZonedDateTime start,
java.time.ZonedDateTime finish)
Counts time according to a schedule between dates.
|
java.lang.String |
getZoneId() |
boolean |
isWorkingTime(java.util.Date localDateTime)
Checks the date according to the schedule.
|
boolean |
isWorkingTime(java.time.ZonedDateTime localDateTime)
Checks the date according to the schedule.
|
public int getId()
getId
in interface WorkCalendar
public long getWorkTimeBetweenDates(@Nonnull java.util.Date start, @Nonnull java.util.Date finish) throws com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
WorkCalendar
return time in seconds.
getWorkTimeBetweenDates
in interface WorkCalendar
com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
public java.util.Date addWorkTime(@Nonnull java.util.Date date, long afterSeconds) throws com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
WorkCalendar
addWorkTime
in interface WorkCalendar
com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
public java.util.Date getNextWorkDateTime(@Nonnull java.util.Date date) throws com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
WorkCalendar
getNextWorkDateTime
in interface WorkCalendar
com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
public boolean isWorkingTime(java.util.Date localDateTime) throws com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
WorkCalendar
isWorkingTime
in interface WorkCalendar
com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
public long getWorkTimeBetweenDates(@Nonnull java.time.ZonedDateTime start, @Nonnull java.time.ZonedDateTime finish)
WorkCalendar
return time in seconds.
getWorkTimeBetweenDates
in interface WorkCalendar
public java.time.ZonedDateTime addWorkTime(@Nonnull java.time.ZonedDateTime date, long afterSeconds)
WorkCalendar
addWorkTime
in interface WorkCalendar
public java.time.ZonedDateTime getNextWorkDateTime(@Nonnull java.time.ZonedDateTime date) throws com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
WorkCalendar
getNextWorkDateTime
in interface WorkCalendar
com.jibrok.jira.plugins.timeinstatus.calendar.exception.CalendarException
public boolean isWorkingTime(java.time.ZonedDateTime localDateTime)
WorkCalendar
isWorkingTime
in interface WorkCalendar
public java.lang.String getZoneId()
getZoneId
in interface WorkCalendar