File: spain.py

package info (click to toggle)
python-workalendar 17.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,568 kB
  • sloc: python: 16,500; makefile: 34; sh: 5
file content (200 lines) | stat: -rw-r--r-- 5,138 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
from ..core import WesternCalendar
from ..registry_tools import iso_register


@iso_register('ES')
class Spain(WesternCalendar):
    'Spain'

    # Christian holidays
    include_epiphany = True
    include_good_friday = True
    include_assumption = True
    include_all_saints = True
    include_immaculate_conception = True

    # Civil holidays
    include_labour_day = True
    labour_day_label = "Día del trabajador"
    FIXED_HOLIDAYS = WesternCalendar.FIXED_HOLIDAYS + (
        (10, 12, "Fiesta nacional de España"),
        (12, 6, "Día de la Constitución Española")
    )


@iso_register('ES-AN')
class Andalusia(Spain):
    "Andalusia"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (2, 28, "Andalusian National Day"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-AR')
class Aragon(Spain):
    "Aragon"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (4, 23, "Aragonese National Day"),
        (12, 20, "Aragon Ombudsman Day"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-CL')
class CastileAndLeon(Spain):
    "Castile and León"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (4, 23, "Día de Castilla y León"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-CM')
class CastillaLaMancha(Spain):
    "Castilla-La Mancha"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (5, 31, "Día de la Región Castilla-La Mancha"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-CN')
class CanaryIslands(Spain):
    "Canary Islands"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (5, 30, "Día de Canarias"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-CT')
class Catalonia(Spain):
    "Catalonia"

    include_easter_monday = True
    include_boxing_day = True
    boxing_day_label = "Sant Esteve"

    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (9, 11, "Diada nacional de Catalunya"),
        (6, 24, "La revetlla de Sant Joan, Nit de Sant Joan"),
    )


@iso_register('ES-EX')
class Extremadura(Spain):
    "Extremadura"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (9, 8, "Día de Extremadura"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-GA')
class Galicia(Spain):
    "Galicia"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (5, 17, "Día das Letras Galegas"),
        (7, 25, "Santiago Apóstol o Día da Patria Galega"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-IB')
class BalearicIslands(Spain):
    "Balearic Islands"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (3, 1, "Dia de les Illes Balears"),
    )
    # Christian holidays
    include_holy_thursday = True  # Also called Maundy thursday
    include_easter_monday = True


@iso_register('ES-RI')
class LaRioja(Spain):
    "La Rioja"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (6, 9, "Dia de La Rioja"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-MD')
class CommunityofMadrid(Spain):
    "Community of Madrid"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (5, 2, "Fiesta de la Comunidad de Madrid"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-MC')
class Murcia(Spain):
    "Region of Murcia"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (6, 9, "Día de la Región de Murcia"),
        (3, 19, "San José"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-NA')
class Navarre(Spain):
    "Navarre"
    # Christian holidays
    include_holy_thursday = True  # Also called Maundy thursday
    include_easter_monday = True


@iso_register('ES-AS')
class Asturias(Spain):
    "Asturias"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (9, 8, "Día de Asturias"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-PV')
class BasqueCountry(Spain):
    "Basque Country"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (10, 25, "Euskadi Eguna"),
    )
    # Christian holidays
    include_holy_thursday = True  # Also called Maundy thursday
    include_easter_monday = True


@iso_register('ES-CB')
class Cantabria(Spain):
    "Cantabria"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (9, 15, "Día de Cantabria o Día de La Montaña"),
    )
    # Christian holiday
    include_holy_thursday = True  # Also called Maundy thursday


@iso_register('ES-VC')
class ValencianCommunity(Spain):
    "Valencian Community"
    FIXED_HOLIDAYS = Spain.FIXED_HOLIDAYS + (
        (3, 19, "San José"),
        (10, 9, "Dia de la Comunitat Valenciana"),
    )
    # Christian holiday
    include_easter_monday = True