libtad_models/holidays/
holiday_type.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Serialize, Deserialize)]
4#[serde(rename_all = "lowercase")]
5/// All valid holiday types.
6pub enum HolidayType {
7    /// Combinations of all known types (except fun).
8    All,
9
10    /// Default holiday set: federal, federallocal, obs1, weekday.
11    Default,
12
13    /// Default set depending on country.
14    /// For most countries, this is the same as default. However,
15    /// for some countries it makes sense to add further types - this type
16    /// accounts for this case. Currently this only affects the UK:
17    /// local holidays are added as well. This is to include days that
18    /// are only valid in one of the countries - e.g. Jan 2 is a holiday only for Scotland.
19    CountryDefault,
20
21    /// Important (obs1), common (obs2) and other observances (obs3).
22    Obs,
23
24    /// All religious holidays: buddhism, christian, hebrew, hinduism, muslm, orthodox.
25    Religious,
26
27    /// Some countries (e.g. Sweden) have days which are de facto treated as official holidays,
28    /// even if there's no legal regulation.
29    Defacto,
30
31    /// Federal/national holidays.
32    Federal,
33
34    /// Common local holidays.
35    FederalLocal,
36
37    /// Flag days.
38    FlagDay,
39
40    /// Half day holidays (only afternoon off). These days can be half holidays either by law, or
41    /// being de facto half day holidays (e.g. Sweden).
42    HalfDay,
43
44    /// Local holidays.
45    Local,
46
47    /// Local observances.
48    Local2,
49
50    ///Important observances.
51    Obs1,
52
53    /// Common observances.
54    Obs2,
55
56    /// Other observances.
57    Obs3,
58
59    /// Optional holiday.
60    /// Employment and holiday laws in certain countries allow employees to choose a limited number
61    /// of holidays from a list of holidays. Some employees may choose to take the day off on these
62    /// days, however, most offices and businesses remain open.
63    Optional,
64
65    /// Normal working days.
66    /// In some cases, working days are declared non-working days in order to form a longer period
67    /// of consecutive non-working days. In exchange, weekend days become normal working days.
68    Weekday,
69
70    /// Buddhist holidays.
71    Buddhism,
72
73    /// Christian holidays.
74    Christian,
75
76    /// Hebrew holidays.
77    Hebrew,
78
79    /// Hindu holidays.
80    Hinduism,
81
82    /// Muslim holidays.
83    Muslim,
84
85    /// Orthodox holidays.
86    Orthodox,
87
88    /// Religious holidays, not covered by other types.
89    OtherReligion,
90
91    /// Seasons (equinoxes and solstices).
92    Seasons,
93
94    /// Sport events.
95    Sport,
96
97    /// Time zone events - daylight savings time start and end.
98    TZ,
99
100    /// United Nations days.
101    UN,
102
103    /// Worldwide observances.
104    World,
105
106    /// Fun, Wacky and Trivial holidays.
107    Fun,
108}