Interface IBusinessCalendar
-
- All Known Subinterfaces:
IDefaultBusinessCalendar
public interface IBusinessCalendar
The
IBusinessCalendar
supports time calculations in business hours and days.Instead of using 24 hours a day and 7 days a week the
IBusinessCalendar
uses a set of predefined free days and working hours for time calculations.The Server Guide describes how these free days and working hours can be configured for your application.
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BusinessDuration
getBusinessDuration(DateTime start, DateTime end)
Calculates the amount of working time between a period of time.DateTime
getBusinessTimeIn(BusinessDuration businessDuration)
Calculates the date and time after a period of working time is over.DateTime
getBusinessTimeIn(DateTime startDateTime, BusinessDuration businessDuration)
Calculates the date and time after a period of working time is over.Date
getFirstWorkDayOfMonth(Number relativeMonths)
Calculates the first working day of a month relative to the current month.Date
getFirstWorkDayOfWeek(Number relativeWeeks)
Calculates the first working day of a week relative to the current week.Date
getFirstWorkDayOfYear(Number relativeYears)
Calculates the first working day of a year relative to the current year.Date
getLastWorkDayOfMonth(Number relativeMonths)
Calculates the last working date of a month relative to the current month.Date
getLastWorkDayOfWeek(Number relativeWeeks)
Calculates the last working date of a week relative to the current week.Date
getLastWorkDayOfYear(Number relativeYears)
Calculates the last working date of a year relative to the current year.String
getName()
Gets the name of the business calendarDate
getWorkDayIn(Date startDate, Number relativeWorkDays)
Calculates the working day date after the relative amount of working days are over.DateTime
getWorkDayIn(Date startDate, Number relativeWorkDays, Time dayTime)
Calculates the working day date after the relative amount of working days are over.DateTime
getWorkDayIn(DateTime startDateTime, Number relativeWorkDays)
Calculates the working day date after the relative amount of working days are over.Date
getWorkDayIn(Number relativeWorkDays)
Calculates the working day date after the relative amount of working days are over.
SeegetWorkDayIn(Date, Number)
for more information.DateTime
getWorkDayIn(Number relativeWorkDays, Time dayTime)
Calculates the working day date after the relative amount of working days are over.boolean
isWorkDay(Date date)
Checks whether a date is a working day or not.boolean
isWorkTime(DateTime dateTime)
Checks whether a date time is a working time or not.
-
-
-
Method Detail
-
getName
String getName()
Gets the name of the business calendar- Returns:
- the name of the business calendar
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getWorkDayIn
Date getWorkDayIn(Number relativeWorkDays)
Calculates the working day date after the relative amount of working days are over.
SeegetWorkDayIn(Date, Number)
for more information.- Parameters:
relativeWorkDays
- Amount of work days relative to the current day.- Returns:
- Work day date.
- See Also:
getWorkDayIn(Date, Number)
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getWorkDayIn
Date getWorkDayIn(Date startDate, Number relativeWorkDays)
Calculates the working day date after the relative amount of working days are over. A free day is part of next work day.
Example: All days of the week are working days except the Sunday is a day off.
------------------------------------
| FR | SA | SU (day off) | MO | TU |
------------------------------------
getWorkDayIn(SA, 0) -> SA
getWorkDayIn(SA, 1) -> MO
getWorkDayIn(SA, -1) -> FR
getWorkDayIn(SU, 0) -> MO
getWorkDayIn(SU, 1) -> TU
getWorkDayIn(SU, -1) -> SA
getWorkDayIn(MO, 0) -> MO
getWorkDayIn(MO, 1) -> DI
getWorkDayIn(MO, -1) -> SA
- Parameters:
startDate
- Date from where the calculation starts.relativeWorkDays
- Amount of work days relative to the start date.- Returns:
- Work day date.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getWorkDayIn
DateTime getWorkDayIn(DateTime startDateTime, Number relativeWorkDays)
Calculates the working day date after the relative amount of working days are over. The returned date time represents the calculated working day at the time of the start.
SeegetWorkDayIn(Date, Number)
for more information.- Parameters:
startDateTime
- Date and time from where the calculation starts.relativeWorkDays
- Amount of work days relative to the start date.- Returns:
- Work day date and time.
- See Also:
getWorkDayIn(Date, Number)
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getWorkDayIn
DateTime getWorkDayIn(Number relativeWorkDays, Time dayTime)
Calculates the working day date after the relative amount of working days are over. The returned date time represents the calculated working day at the parameterized time. SeegetWorkDayIn(Date, Number)
for more information.- Parameters:
relativeWorkDays
- Amount of work days relative to the current day.dayTime
- Time in the work day.- Returns:
- Work day date and time.
- See Also:
getWorkDayIn(Date, Number)
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getWorkDayIn
DateTime getWorkDayIn(Date startDate, Number relativeWorkDays, Time dayTime)
Calculates the working day date after the relative amount of working days are over. The returned date time represents the calculated working day at the parameterized time. SeegetWorkDayIn(Date, Number)
for more information.- Parameters:
startDate
- Date from where the calculation starts.relativeWorkDays
- Amount of work days relative to the start date.dayTime
- Time in the work day.- Returns:
- Work day date and time.
- See Also:
getWorkDayIn(Date, Number)
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getFirstWorkDayOfWeek
Date getFirstWorkDayOfWeek(Number relativeWeeks)
Calculates the first working day of a week relative to the current week.- Parameters:
relativeWeeks
- Amount of weeks relative to the current week.- Returns:
- The first working date of the specified week.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getFirstWorkDayOfMonth
Date getFirstWorkDayOfMonth(Number relativeMonths)
Calculates the first working day of a month relative to the current month.- Parameters:
relativeMonths
- Amount of months relative to the current month.- Returns:
- The first working date of the specified month.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getFirstWorkDayOfYear
Date getFirstWorkDayOfYear(Number relativeYears)
Calculates the first working day of a year relative to the current year.- Parameters:
relativeYears
- Amount of years relative to the current year.- Returns:
- The first working date of the specified year.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getLastWorkDayOfWeek
Date getLastWorkDayOfWeek(Number relativeWeeks)
Calculates the last working date of a week relative to the current week.- Parameters:
relativeWeeks
- Amount of weeks relative to the current week.- Returns:
- The last working date of the specified week.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getLastWorkDayOfMonth
Date getLastWorkDayOfMonth(Number relativeMonths)
Calculates the last working date of a month relative to the current month.- Parameters:
relativeMonths
- Amount of months relative to the current month.- Returns:
- The last working date of the specified month.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getLastWorkDayOfYear
Date getLastWorkDayOfYear(Number relativeYears)
Calculates the last working date of a year relative to the current year.- Parameters:
relativeYears
- Amount of years relative to the current year.- Returns:
- The last working date of the specified year.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getBusinessTimeIn
DateTime getBusinessTimeIn(BusinessDuration businessDuration)
Calculates the date and time after a period of working time is over.- Parameters:
businessDuration
- Working time relative to the current time.- Returns:
- Date and time when the working period is over.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getBusinessTimeIn
DateTime getBusinessTimeIn(DateTime startDateTime, BusinessDuration businessDuration)
Calculates the date and time after a period of working time is over.- Parameters:
startDateTime
- Date and time from where the calculation starts.businessDuration
- Working time relative to the start date.- Returns:
- Date and time when the working period is over.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getBusinessDuration
BusinessDuration getBusinessDuration(DateTime start, DateTime end)
Calculates the amount of working time between a period of time.- Parameters:
start
- Period start date and timeend
- Period end date and time- Returns:
- Working time between the given period.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
isWorkDay
boolean isWorkDay(Date date)
Checks whether a date is a working day or not.- Parameters:
date
- Date to check- Returns:
- True if the date is defined as a working day.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
isWorkTime
boolean isWorkTime(DateTime dateTime)
Checks whether a date time is a working time or not.- Parameters:
dateTime
- Date and time to check- Returns:
- True if the time at the specified date is defined as working time.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
-