A class to handle a list of public holidays. It allows you to add holidays in various ways, and also to query whether a particular date-time falls on a holiday.
Located in /holiday-defs.php (line 36)
Constructor. Optionally pass in an associative array with the key of a unique holiday description, and value as the timestamp of the holiday itself.
Add a holiday date as a date-string in the usual kinds of form such as '25-12', or '25 December 2007' or '25/12/2007' etc. This is a friendly method for adding general holiday dates.
Add a holiday which is calculated as being the Nth occurence of a given dayname, in a given month. This method is a common one for designating National holidays, eg. 'Queen's Birthday' as being the first Monday in June.
Add a holiday timestamp to the array. This is the internal method for adding raw holiday timestamps.
Check if the given timestamp is the date of a public holiday. We
return true if it is, else false. Note: if the timestamp falls on a holiday, then the holiday description is left in the class var 'matched_holiday_desc' on exit. If the passed-in timestamp is not given, then the method assume 'now' as the timestamp.
Documentation generated by phpDocumentor 1.3.0RC3