Hybrid Integration 10.1 | Integrating On-Premises Applications | Integration Server Built-In Services | Date Folder | pub.date:getWorkingDays
 
pub.date:getWorkingDays
WmPublic. Returns the number of working days between two dates.
The number of working days returned includes the startDate, but excludes the endDate.
Input Parameters
startDate
String Starting date and time.
endDate
String Ending date and time.
startDatePattern
String Format in which the startDate parameter is to be specified (for example, yyyyMMdd HH:mm:ss.SSS). For pattern-string notation, see Pattern String Symbols.
endDatePattern
String Format in which the endDate parameter is to be specified (for example, yyyyMMdd HH:mm:ss.SSS). For pattern-string notation, see Pattern String Symbols.
Output Parameters
workingDays
String Number of days between startDate and endDate excluding weekends and holidays.
Usage Notes
The pub.date:getWorkingDays service requires you to configure holidays and weekend days in the holidays.cnf configuration file in Integration Server_directory \instances\instance_name\packages\WmPublic\config directory. The pub.date:getWorkingDays service uses this configuration file to find the number of working days between two dates.
Note: If you make any changes to the holidays.cnf, you must reload the WmPublic package or restart Integration Server for the changes to take effect.
Parameter Settings for holidays.cnf file
The following table gives the parameter settings for the holidays.cnf file:
Parameter
Description
holiday.format
The date format in which holidays are to be specified. The default format is MM/dd/yyyy.
holiday.<number>
Holidays in a year. No default values are set for the holiday parameter in the holidays.cnf file.
For example, if July 4, 2009 and December 25, 2009 are holidays, then it can be specified as:
holiday.1=07/04/2009
holiday.2=12/25/2009
weekend.<number>
Weekends days. Valid values are sunday, monday, tuesday, wednesday, thursday, friday, and saturday. No default values are set for the weekend parameter in the holidays.cnf file.
If Sunday and Saturday are weekends, then it can be specified as:
weekend.1
weekend.2=saturday
Note: If invalid date or weekend is specified in the configuration file, the pub.date:getWorkingDays service will throw errors on execution.

Copyright © 2015- 2017 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.