|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CBusinessDatesTable class
|
|
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.
|
|
AddHolidayRecord
|
Private
|
Add a record to the holiday table
|
|
AddToHolidayTable
|
Method
|
Add records to the holiday table as defined in the Initialize function
|
|
Class_Terminate
|
Terminate
|
Close opened objects
|
|
CreateHolidayTable
|
Method
|
Create a table for the holiday records
|
|
DiffBusinessDays
|
Method
|
Returns the number of business days between two dates.
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
|
|
FixHolidayDate
|
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.
|
|
GetBusinessDay
|
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 considered business days.
|
|
GetHolidayName
|
Method
|
Determine if the specified date is a holiday (in the holiday table), and if so, provide the name
Requires the holiday field name to exist and containing a value to retrieve.
|
|
GetNextHoliday
|
Method
|
Determine the next holiday date after the provided date
|
|
GetNextHolidayName
|
Method
|
Get the next holiday date and name after the provided date
|
|
GetPrevHoliday
|
Method
|
Determine the holiday date before the provided date
|
|
GetPrevHolidayName
|
Method
|
Get the holiday date and name before the provided date
|
|
HolidayCount
|
Method
|
Gets the number of holidays in the holiday table
|
|
Initialize
|
Method
|
Defines the holiday table and its field names. Use an existing table or create it.
This method must be called before using any of the class methods to work with business days.
Uses ADO to support ACCDB/MDB and ADPs
|
|
IsBusinessDay
|
Method
|
Determine if the specified date is a business day (not in the holiday table and not a weekend day)
|
|
IsHoliday
|
Method
|
Determine if the specified date is a holiday (in the holiday table)
|
|
LastDayOfWeekInMonth
|
Private
|
Calculates the last day (Sunday, Monday, etc.) of the month
|
|
MonthBusinessDays
|
Method
|
Number of business days in a month
|
|
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
|
|
YearBusinessDays
|
Method
|
Number of business days in a year
|