Package com.timeanddate.services
Class BusinessDurationService
java.lang.Object
com.timeanddate.services.BaseService
com.timeanddate.services.BusinessDurationService
- Author:
- Daniel Alvsåker <daniel@timeanddate.com>
-
Field Summary
Fields inherited from class com.timeanddate.services.BaseService
Language, ServiceName, Version
-
Constructor Summary
ConstructorsConstructorDescriptionBusinessDurationService(String accessKey, String secretKey)
The businessduration service can be used to calculate the number of business days between a specified start date and end date. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFilter(BusinessDaysFilterType filter)
getDuration(TADDateTime startDate, TADDateTime endDate, LocationId placeId)
The businessduration service can be used to calculate the number of business days between a specified start date and end date.boolean
boolean
void
setFilter(EnumSet<BusinessDaysFilterType> filter)
void
setIncludeDays(boolean bool)
void
setIncludeLastDate(boolean bool)
-
Constructor Details
-
BusinessDurationService
The businessduration service can be used to calculate the number of business days between a specified start date and end date.- Parameters:
accessKey
- Access key.secretKey
- Secret key.- Throws:
AuthenticationException
- Encryption of the authentication failed
-
-
Method Details
-
setIncludeDays
public void setIncludeDays(boolean bool) -
getIncludeDays
public boolean getIncludeDays() -
setIncludeLastDate
public void setIncludeLastDate(boolean bool) -
getIncludeLastDate
public boolean getIncludeLastDate() -
setFilter
-
addFilter
-
getFilter
-
getDuration
public BusinessDuration getDuration(TADDateTime startDate, TADDateTime endDate, LocationId placeId) throws IllegalArgumentException, ServerSideExceptionThe businessduration service can be used to calculate the number of business days between a specified start date and end date.- Parameters:
startDate
- Start date to calculate from.endDate
- End date to calculate to.placeId
- The places identifier.- Returns:
- The calculated result and geographical information.
- Throws:
ServerSideException
- The server produced an error message.IllegalArgumentException
- A required argument was not as expected.
-