| Version: 3.3.1

Static Public Member Functions | Protected Member Functions | List of all members
wxDateTimeHolidayAuthority Class Referenceabstract
Class List by Category » Data Structures

`#include <wx/datetime.h>`

Inheritance diagram for wxDateTimeHolidayAuthority:
[legend]

## Detailed Description

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.

##

Library: wxBase
Category: Data Structures

## 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...

## Member Function Documentation

## ◆ AddAuthority()

static void wxDateTimeHolidayAuthority::AddAuthority | ( | wxDateTimeHolidayAuthority * | auth | ) |
| static

Adds a new holiday authority.

The pointer will be deleted by wxDateTimeHolidayAuthority.

## ◆ ClearAllAuthorities()

static void wxDateTimeHolidayAuthority::ClearAllAuthorities | ( |  | ) |
| static

Clears the list of holiday authorities.

## ◆ DoGetHolidaysInRange()

virtual size_t wxDateTimeHolidayAuthority::DoGetHolidaysInRange | ( | const wxDateTime & | dtStart,
|  | const wxDateTime & | dtEnd,
|  | wxDateTimeArray & | holidays
| ) |  | const
| protected pure virtual

This function should be overridden to fill an array with all holidays between the two given dates.

Implemented in wxDateTimeChristianHolidays, wxDateTimeUSCatholicFeasts, and wxDateTimeWorkDays.

## ◆ DoIsHoliday()

virtual bool wxDateTimeHolidayAuthority::DoIsHoliday | ( | const wxDateTime & | dt | ) | const
| protected pure virtual

This function should be overridden to determine whether a given day is a holiday.

Implemented in wxDateTimeChristianHolidays, wxDateTimeUSCatholicFeasts, and wxDateTimeWorkDays.

## ◆ GetHolidaysInRange()

static size_t wxDateTimeHolidayAuthority::GetHolidaysInRange | ( | const wxDateTime & | dtStart,
|  | const wxDateTime & | dtEnd,
|  | wxDateTimeArray & | holidays
| ) |  |
| static

Fills the provided array with all holidays in the given range, returns the number of them.

## ◆ IsHoliday()

static bool wxDateTimeHolidayAuthority::IsHoliday | ( | const wxDateTime & | dt | ) |
| static

Returns true if the given date is a holiday.