|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CBusinessDatesFile class
|
|
Delimiter
|
Property
|
Gets the value to use to separate the Date/Time portion of the date file from the name of the holiday in the holiday file.
The default value is "|"
|
|
HolidayCount
|
Property
|
Gets the count of holidays in the holiday list.
|
|
HolidayDate
|
Property
|
Gets the date of the specified holiday from the holiday list.
You may read the value of this property in a loop construct by incrementing a counter from the value 1 to the value contained in the HolidayCount property.
|
|
HolidayName
|
Property
|
Gets the name of the specified holiday from the holiday list.
You may read the value of this property in a loop construct by incrementing a counter from the value 1 to the value contained in the HolidayCount property.
|
|
AddBusinessDays
|
Method
|
Add or subtract a number of business days to a date.
Weekend dates (Saturday and Sunday) are not counted in adding/subtracting days.
|
|
BusinessDaysInMonth
|
Method
|
Returns the number of business days in a month.
|
|
CheckBusinessDay
|
Method
|
Determine if a date is a business day and if not, find the next or previous business day.
Weekend dates (Saturday and Sunday) are not counted as business days.
|
|
Class_Initialize
|
Initialize
|
Set initial values to defaults which may be overridden with property settings
|
|
DiffBusinessDays
|
Method
|
Returns the number of business days between two dates. The days are rounded down--it takes 24 hours to make a day.
Weekend dates (Saturday and Sunday) and holidays are not counted.
|
|
DiffWeekdays
|
Private
|
Returns the number of weekdays between two dates. The days are rounded down (it takes 24 hours to make a day)
|
|
FindHoliday
|
Private
|
Locates a holiday in the private holiday array
|
|
HolidayDateFixed
|
Method
|
For fixed date holidays (New Year's, 4th of July, Christmas), returns the celebrated date based on Federal guidelines.
i.e. Saturday dates are shifted to Friday, and Sunday dates are shifted to Monday.
|
|
HolidayTblWrite
|
Private
|
Add a line to the holiday file
|
|
LastDayOfWeekInMonth
|
Private
|
Calculates the last day (Sunday, Monday, etc.) of the month
|
|
LoadHolidayFile
|
Method
|
Loads the specified holiday file into the class.
This method must be called before using any of the class methods to work with business days. You can auto-generate a sample file to use by calling the MakeHolidayFile method.
|
|
MakeHolidayFile
|
Method
|
Creates the holiday file with standard U.S. holidays filled in for each standard U.S. holiday between the years specified.
After the file is generated you may modify it using a standard text editor such as Notepad.
|
|
MonthFirstBusinessDay
|
Method
|
Calculate the first business day of the month
|
|
MonthLastBusinessDay
|
Method
|
Calculate the last business day of the month
|
|
NthDayOfMonth
|
Private
|
Returns the date of the Nth day (Monday, Tuesday, etc.) of the month
|