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 Type
    Method
    Description
    Returns the first Date that matches the given timeExpression and falls into the business calendar working hours.
    long
    Returns the difference, in milliseconds, between the business date that matches the given timeExpression, and the current time.
  • Method Details

    • calculateBusinessTimeAsDuration

      long calculateBusinessTimeAsDuration(String timeExpression)
      Returns the difference, in milliseconds, between the business date that matches the given timeExpression, and the current time. See calculateBusinessTimeAsDate(java.lang.String) for business date calculation
      Parameters:
      timeExpression - time expression that is supported by business calendar implementation.
      Returns:
      duration expressed in milliseconds
    • calculateBusinessTimeAsDate

      Date calculateBusinessTimeAsDate(String timeExpression)
      Returns the first Date that matches the given timeExpression and 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