Package org.kie.kogito.calendar
Interface BusinessCalendar
public interface BusinessCalendar
BusinessCalendar allows for defining custom definitions of working days, hours and holidays
to be taken under consideration when scheduling time based activities such as timers or deadlines.
-
Method Summary
Modifier and TypeMethodDescriptioncalculateBusinessTimeAsDate(String timeExpression) Returns the firstDatethat matches the giventimeExpressionand falls into the business calendar working hours.longcalculateBusinessTimeAsDuration(String timeExpression) Returns the difference, in milliseconds, between the business date that matches the giventimeExpression, and the current time.
-
Method Details
-
calculateBusinessTimeAsDuration
Returns the difference, in milliseconds, between the business date that matches the giventimeExpression, and the current time. SeecalculateBusinessTimeAsDate(java.lang.String)for business date calculation- Parameters:
timeExpression- time expression that is supported by business calendar implementation.- Returns:
- duration expressed in milliseconds
-
calculateBusinessTimeAsDate
Returns the firstDatethat matches the giventimeExpressionand falls into the business calendar working hours.- Parameters:
timeExpression- time expression that is supported by business calendar implementation.- Returns:
- date when given time expression will match in the future
-