Package com.timeanddate.services
Class BusinessDateService
java.lang.Object
com.timeanddate.services.BaseService
com.timeanddate.services.BusinessDateService
- Author:
- Daniel Alvsåker <daniel@timeanddate.com>
-
Field Summary
Fields inherited from class com.timeanddate.services.BaseService
Language, ServiceName, Version
-
Constructor Summary
ConstructorsConstructorDescriptionBusinessDateService(String accessKey, String secretKey)
The businessdate service can be used to find a business date from a specified number of days. -
Method Summary
Modifier and TypeMethodDescriptionaddDays(TADDateTime startDate, int days, LocationId placeId)
The businessdate service can be used to find a business date from a specified number of days.addDays(TADDateTime startDate, List<Integer> days, LocationId placeId)
The businessdate service can be used to find a business date from a specified number of days.void
addFilter(BusinessDaysFilterType filter)
boolean
void
setFilter(EnumSet<BusinessDaysFilterType> filter)
void
setIncludeDays(boolean bool)
void
setRepeat(int repeat)
subtractDays(TADDateTime startDate, int days, LocationId placeId)
The businessdate service can be used to find a business date from a specified number of days.subtractDays(TADDateTime startDate, List<Integer> days, LocationId placeId)
The businessdate service can be used to find a business date from a specified number of days.
-
Constructor Details
-
BusinessDateService
The businessdate service can be used to find a business date from a specified number of days.- 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() -
setRepeat
public void setRepeat(int repeat) -
setFilter
-
addFilter
-
getFilter
-
addDays
public BusinessDates addDays(TADDateTime startDate, List<Integer> days, LocationId placeId) throws IllegalArgumentException, ServerSideExceptionThe businessdate service can be used to find a business date from a specified number of days.- Parameters:
startDate
- Start date to calculate from.days
- Days to add. Can be a list of several days.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.
-
addDays
public BusinessDates addDays(TADDateTime startDate, int days, LocationId placeId) throws IllegalArgumentException, ServerSideExceptionThe businessdate service can be used to find a business date from a specified number of days.- Parameters:
startDate
- Start date to calculate from.days
- Days to add.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.
-
subtractDays
public BusinessDates subtractDays(TADDateTime startDate, List<Integer> days, LocationId placeId) throws IllegalArgumentException, ServerSideExceptionThe businessdate service can be used to find a business date from a specified number of days.- Parameters:
startDate
- Start date to calculate from.days
- Days to subtract. Can be a list of several days.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.
-
subtractDays
public BusinessDates subtractDays(TADDateTime startDate, int days, LocationId placeId) throws IllegalArgumentException, ServerSideExceptionThe businessdate service can be used to find a business date from a specified number of days.- Parameters:
startDate
- Start date to calculate from.days
- Days to subtract.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.
-