#include <wx/datetime.h>
Class which decides whether a given date is a holiday and is used by all functions working with "work days".
New classes can be derived from this to determine specific holidays. These classes should override DoIsHoliday() and DoGetHolidaysInRange(), and be passed to wxDateTimeHolidayAuthority::AddAuthority() to be used.
Static Public Member Functions | |
static bool | IsHoliday (const wxDateTime &dt) |
Returns true if the given date is a holiday. More... | |
static size_t | GetHolidaysInRange (const wxDateTime &dtStart, const wxDateTime &dtEnd, wxDateTimeArray &holidays) |
Fills the provided array with all holidays in the given range, returns the number of them. More... | |
static void | ClearAllAuthorities () |
Clears the list of holiday authorities. More... | |
static void | AddAuthority (wxDateTimeHolidayAuthority *auth) |
Adds a new holiday authority. More... | |
Protected Member Functions | |
virtual bool | DoIsHoliday (const wxDateTime &dt) const =0 |
This function should be overridden to determine whether a given day is a holiday. More... | |
virtual size_t | DoGetHolidaysInRange (const wxDateTime &dtStart, const wxDateTime &dtEnd, wxDateTimeArray &holidays) const =0 |
This function should be overridden to fill an array with all holidays between the two given dates. More... | |
|
static |
Adds a new holiday authority.
The pointer will be deleted by wxDateTimeHolidayAuthority.
|
static |
Clears the list of holiday authorities.
|
protectedpure virtual |
This function should be overridden to fill an array with all holidays between the two given dates.
Implemented in wxDateTimeChristianHolidays, wxDateTimeUSCatholicFeasts, and wxDateTimeWorkDays.
|
protectedpure virtual |
This function should be overridden to determine whether a given day is a holiday.
Implemented in wxDateTimeChristianHolidays, wxDateTimeUSCatholicFeasts, and wxDateTimeWorkDays.
|
static |
Fills the provided array with all holidays in the given range, returns the number of them.
|
static |
Returns true if the given date is a holiday.