Number of working days between two dates (excluding weekends and public holidays)
(my previous post of this document (Aug 2012) has been damaged by the move "MOSC -> OTN" and I can't edit it... :-( I copy it again)
This function computes the number of days between two dates, skipping weekends as well as public holidays (if asked and if public holidays are stored in a table)
I give an example of "public_holiday" table with sample data, but the users have to make sure that their table contains the relevant data (all public holidays within the maximum range of use of the function)
CREATE TABLE public_holiday( calendar_day DATE, text VARCHAR2(30) );