Package com.illumon.util.calendar
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 Summary
Modifier and Type Method Description long
businessTimeElapsed(DBDateTime time)
Returns the amount of business time in nanoseconds that has elapsed on the given day by the specified time.BusinessPeriod[]
getBusinessPeriods()
Gets the business periods for the day.DBDateTime
getEndOfBusinessDay()
Gets the end of the business day.DBDateTime
getEOBD()
Gets the end of the business day.long
getLengthOfBusinessDay()
Gets the length of the business day in nanoseconds.long
getLOBD()
Gets the length of the business day in nanoseconds.DBDateTime
getSOBD()
Gets the start of the business day.DBDateTime
getStartOfBusinessDay()
Gets the start of the business day.boolean
isBusinessDay()
Is this day a business day?boolean
isBusinessTime(DBDateTime time)
Determines if the specified time is a business time for the day.
-
Method Details
-
getBusinessPeriods
Gets the business periods for the day.- Returns:
- the BusinessPeriods for the day
-
getSOBD
Gets the start of the business day.- Returns:
- start of the business day
-
getStartOfBusinessDay
Gets the start of the business day.- Returns:
- start of the business day
-
getEOBD
Gets the end of the business day.- Returns:
- end of the business day
-
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
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
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
-