Introduction: The Business Days family deals with functions that explicitly take into account Business Days (see List of Holidays). It does this using a variable called BusDaySwitch, although any function that accepts an annual date sequence (see Annual Date Sequences) can also accept a BusDaySwitch within the date sequence. The Business Days family itself is quite large:
- The basic building block is the IsBD function, which determines if a day is a business day or not. You can specify whether to exclude just weekends or particular National Holidays. Using the optional arguments AnnHols and HolDates you can specify almost any type of holiday scenario. AnnHols is an annual date sequence of recurring holidays, and HolDates is a list of specific holiday dates.
- Like the Date Difference and Date Increment families you can either choose to let the optional DayCount and Periods default or specify a specific daycount method to govern how a date difference is computed (See Using Daycount for more details). Functions like DpYBD, DpMBD and DpDBD are used to increment dates so that the resulting date falls on a business day. In other words, first of all the function calculates the target date, and if that date falls on a non-business day it will slip the date forward until it encounters the first business day (note that you can"t slip the day backwards).
- For determining the next or previous date, with reference correspondingly to a specific time interval, a sequence of dates or list of dates, there is NextBD and PrevBD, NextDateSeqBD and PrevDateSeqBD, and NextDateListBD and PrevDateListBD.
- Finally there is NetWorkDaysBF - a function like Excel"s own NetworkDays, which determines the number of work days between two dates (including the two end dates). The differences with the Business Functions version is that whereas Excel"s function assumes which days of the week are weekends, the BF function allows you to specify. Also, the BF function allows you to specify an annually recurring date sequence of holidays (non-work days), and, via a BusDaySwitch, a bank holiday convention (eg US, UK etc).
|