Class BusinessSchedule

java.lang.Object
com.illumon.util.calendar.BusinessSchedule
All Implemented Interfaces:
Serializable

public class BusinessSchedule
extends Object
implements Serializable
Description of a single business day.
See Also:
Serialized Form
  • Method Details

    • getBusinessPeriods

      public BusinessPeriod[] getBusinessPeriods()
      Gets the business periods for the day.
      Returns:
      the BusinessPeriods for the day
    • getSOBD

      public DBDateTime getSOBD()
      Gets the start of the business day.
      Returns:
      start of the business day
    • getStartOfBusinessDay

      public DBDateTime getStartOfBusinessDay()
      Gets the start of the business day.
      Returns:
      start of the business day
    • getEOBD

      public DBDateTime getEOBD()
      Gets the end of the business day.
      Returns:
      end of the business day
    • getEndOfBusinessDay

      public DBDateTime getEndOfBusinessDay()
      Gets the end of the business day.
      Returns:
      end of the business day
    • getLOBD

      public long getLOBD()
      Gets the length of the business day in nanoseconds. If the business day has multiple periods, only the time during the periods is counted.
      Returns:
      length of the day in nanoseconds
    • getLengthOfBusinessDay

      public long getLengthOfBusinessDay()
      Gets the length of the business day in nanoseconds. If the business day has multiple periods, only the time during the periods is counted.
      Returns:
      length of the day in nanoseconds
    • isBusinessDay

      public boolean isBusinessDay()
      Is this day a business day?
      Returns:
      true if it is a business day; false otherwise.
    • isBusinessTime

      public boolean isBusinessTime​(DBDateTime time)
      Determines if the specified time is a business time for the day.
      Parameters:
      time - time.
      Returns:
      true if the time is a business time for the day; otherwise, false.
    • businessTimeElapsed

      public long businessTimeElapsed​(DBDateTime time)
      Returns the amount of business time in nanoseconds that has elapsed on the given day by the specified time.
      Parameters:
      time - time
      Returns:
      business time in nanoseconds that has elapsed on the given day by the specified time