HolidayTypes
public struct HolidayTypes : OptionSet, Sequence
extension HolidayTypes: CustomStringConvertible
Holday Types
See also
Holiday Types-
Declaration
Swift
public init(rawValue: Int) -
Declaration
Swift
public let rawValue: Int -
Combinations of all known types (except fun.
Declaration
Swift
static let all: HolidayTypes -
Default holiday set: federal, federallocal, obs1, weekday.
Declaration
Swift
static let htDefault: HolidayTypes -
Default set depending on country.
For most countries, this is the same as default. However, for some countries it makes sense to add further types – this type accounts for this case. Currently this only affects the UK: local holidays are added as well. This is to include days that are only valid in one of countries – e.g. Jan 2 is a holiday only for Scotland.
Declaration
Swift
static let countrydefault: HolidayTypes -
Important (obs1), common (obs2) and other observances (obs3).
Declaration
Swift
static let obs: HolidayTypes -
All religious holidays: buddhism, christian, hebrew, hinduism, muslim, orthodox.
Declaration
Swift
static let religious: HolidayTypes -
Buddhist holidays.
Declaration
Swift
static let buddhism: HolidayTypes -
Christian holidays.
Declaration
Swift
static let christian: HolidayTypes -
Hebrew holidays.
Declaration
Swift
static let hebrew: HolidayTypes -
Hindu holidays.
Declaration
Swift
static let hinduism: HolidayTypes -
Muslim holidays.
Declaration
Swift
static let muslim: HolidayTypes -
Orthodox holidays.
Declaration
Swift
static let orthodox: HolidayTypes -
Religious holidays, not covered by other types.
Declaration
Swift
static let otherreligion: HolidayTypes -
Some countries (e.g. Sweden) have days which are de facto treted as official holidays, even if there’s no legal regulation.
Declaration
Swift
static let defacto: HolidayTypes -
Federal/national holidays.
Declaration
Swift
static let federal: HolidayTypes -
Common local holidays.
Declaration
Swift
static let federallocal: HolidayTypes -
Flag days.
Declaration
Swift
static let flagday: HolidayTypes -
Half day holidays (only afternoon off). These days can be half day holidays either by law, or being de facto half day holidays (e.g. Sweden).
Declaration
Swift
static let halfday: HolidayTypes -
Local holidays.
Declaration
Swift
static let local: HolidayTypes -
Local observances.
Declaration
Swift
static let local2: HolidayTypes -
Important observances.
Declaration
Swift
static let obs1: HolidayTypes -
Common observances.
Declaration
Swift
static let obs2: HolidayTypes -
Other observances.
Declaration
Swift
static let obs3: HolidayTypes -
Optional holiday.
Employment and holiday laws in certain countries allow employees to choose a limited number of holidays from a list of holidays. Some employees may choose to take the day off on these day, however, most offices and businesses remain open.
Declaration
Swift
static let optional: HolidayTypes -
Normal working days.
In some cases, working days are declared non-working days in order to form a longer period of consecutive non-working days. In exchange, weekend days become normal working days.
Declaration
Swift
static let weekday: HolidayTypes -
Fun, Wacky and Trivial Holidays.
Declaration
Swift
static let fun: HolidayTypes -
Declaration
Swift
public var description: String { get }
HolidayTypes Structure Reference