bjeanes-holidays 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +15 -0
- data/LICENSE +21 -0
- data/README.rdoc +77 -0
- data/REFERENCES +16 -0
- data/data/SYNTAX +111 -0
- data/data/au.yaml +111 -0
- data/data/build_defs.rb +152 -0
- data/data/ca.yaml +141 -0
- data/data/de.yaml +111 -0
- data/data/dk.yaml +117 -0
- data/data/es.yaml +161 -0
- data/data/fr.yaml +70 -0
- data/data/gb.yaml +106 -0
- data/data/ie.yaml +58 -0
- data/data/index.yaml +23 -0
- data/data/is.yaml +136 -0
- data/data/it.yaml +66 -0
- data/data/mx.yaml +106 -0
- data/data/nl.yaml +67 -0
- data/data/north_america_informal.yaml +49 -0
- data/data/nyse.yaml +63 -0
- data/data/pt.yaml +85 -0
- data/data/se.yaml +91 -0
- data/data/united_nations.yaml +188 -0
- data/data/ups.yaml +56 -0
- data/data/us.yaml +81 -0
- data/data/za.yaml +78 -0
- data/lib/holidays.rb +404 -0
- data/lib/holidays/MANIFEST +25 -0
- data/lib/holidays/au.rb +42 -0
- data/lib/holidays/ca.rb +68 -0
- data/lib/holidays/de.rb +50 -0
- data/lib/holidays/dk.rb +47 -0
- data/lib/holidays/es.rb +52 -0
- data/lib/holidays/europe.rb +214 -0
- data/lib/holidays/fr.rb +36 -0
- data/lib/holidays/gb.rb +40 -0
- data/lib/holidays/ie.rb +32 -0
- data/lib/holidays/is.rb +61 -0
- data/lib/holidays/it.rb +35 -0
- data/lib/holidays/mx.rb +51 -0
- data/lib/holidays/nl.rb +36 -0
- data/lib/holidays/north_america.rb +107 -0
- data/lib/holidays/nyse.rb +32 -0
- data/lib/holidays/pt.rb +43 -0
- data/lib/holidays/scandinavia.rb +114 -0
- data/lib/holidays/se.rb +52 -0
- data/lib/holidays/united_nations.rb +24 -0
- data/lib/holidays/ups.rb +31 -0
- data/lib/holidays/us.rb +48 -0
- data/lib/holidays/za.rb +35 -0
- data/rakefile.rb +150 -0
- data/test/defs/test_defs_au.rb +36 -0
- data/test/defs/test_defs_ca.rb +29 -0
- data/test/defs/test_defs_de.rb +49 -0
- data/test/defs/test_defs_dk.rb +30 -0
- data/test/defs/test_defs_es.rb +57 -0
- data/test/defs/test_defs_europe.rb +243 -0
- data/test/defs/test_defs_fr.rb +26 -0
- data/test/defs/test_defs_gb.rb +36 -0
- data/test/defs/test_defs_ie.rb +21 -0
- data/test/defs/test_defs_is.rb +33 -0
- data/test/defs/test_defs_it.rb +25 -0
- data/test/defs/test_defs_mx.rb +22 -0
- data/test/defs/test_defs_nl.rb +24 -0
- data/test/defs/test_defs_north_america.rb +54 -0
- data/test/defs/test_defs_nyse.rb +22 -0
- data/test/defs/test_defs_pt.rb +56 -0
- data/test/defs/test_defs_scandinavia.rb +75 -0
- data/test/defs/test_defs_se.rb +32 -0
- data/test/defs/test_defs_ups.rb +21 -0
- data/test/defs/test_defs_us.rb +23 -0
- data/test/defs/test_defs_za.rb +25 -0
- metadata +132 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
==== Regional definitions
|
2
|
+
The following definition files are included in this installation:
|
3
|
+
|
4
|
+
* holidays/au
|
5
|
+
* holidays/ca
|
6
|
+
* holidays/de
|
7
|
+
* holidays/dk
|
8
|
+
* holidays/es
|
9
|
+
* holidays/europe
|
10
|
+
* holidays/fr
|
11
|
+
* holidays/gb
|
12
|
+
* holidays/ie
|
13
|
+
* holidays/is
|
14
|
+
* holidays/it
|
15
|
+
* holidays/mx
|
16
|
+
* holidays/nl
|
17
|
+
* holidays/north_america
|
18
|
+
* holidays/nyse
|
19
|
+
* holidays/pt
|
20
|
+
* holidays/scandinavia
|
21
|
+
* holidays/se
|
22
|
+
* holidays/united_nations
|
23
|
+
* holidays/ups
|
24
|
+
* holidays/us
|
25
|
+
* holidays/za
|
data/lib/holidays/au.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
module Holidays
|
2
|
+
# This file is generated by the Ruby Holiday gem.
|
3
|
+
#
|
4
|
+
# Definitions loaded: data/au.yaml
|
5
|
+
#
|
6
|
+
# To use the definitions in this file, load them right after you load the
|
7
|
+
# Holiday gem:
|
8
|
+
#
|
9
|
+
# require 'holidays'
|
10
|
+
# require 'holidays/au'
|
11
|
+
#
|
12
|
+
# More definitions are available at http://code.dunae.ca/holidays.
|
13
|
+
module AU # :nodoc:
|
14
|
+
DEFINED_REGIONS = [:au_qld, :au_nt, :au, :au_tas, :au_wa, :au_act, :au_nsw, :au_sa, :au_vic, :au_qld_brisbane]
|
15
|
+
|
16
|
+
HOLIDAYS_BY_MONTH = {
|
17
|
+
5 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_qld]},
|
18
|
+
{:wday => 1, :week => 1, :name => "May Day", :regions => [:au_nt]}],
|
19
|
+
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:au]},
|
20
|
+
{:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Easter Saturday", :regions => [:au]},
|
21
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:au]},
|
22
|
+
{:function => lambda { |year| Holidays.easter(year)+2 }, :function_id => "easter(year)+2", :name => "Easter Monday", :regions => [:au_tas]}],
|
23
|
+
6 => [{:wday => 1, :week => 1, :name => "Foundation Day", :regions => [:au_wa]},
|
24
|
+
{:wday => 1, :week => 2, :name => "Queen's Birthday", :regions => [:au_act, :au_nsw, :au_sa, :au_tas, :au_nt, :au_qld, :au_vic]},
|
25
|
+
{:mday => 6, :type => :informal, :name => "Queensland Day", :regions => [:au_qld]}],
|
26
|
+
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:au]},
|
27
|
+
{:mday => 26, :name => "Australia Day", :regions => [:au]}],
|
28
|
+
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:au]},
|
29
|
+
{:mday => 26, :name => "Boxing Day", :regions => [:au]}],
|
30
|
+
8 => [{:wday => 3, :week => -3, :name => "Ekka", :regions => [:au_qld_brisbane]}],
|
31
|
+
3 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_wa]},
|
32
|
+
{:wday => 1, :week => 2, :name => "Eight Hours Day", :regions => [:au_tas]},
|
33
|
+
{:wday => 1, :week => 2, :name => "Labour Day", :regions => [:au_vic]}],
|
34
|
+
4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au]}],
|
35
|
+
10 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_act, :au_nsw, :au_sa]}]
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
Holidays.merge_defs(Holidays::AU::DEFINED_REGIONS, Holidays::AU::HOLIDAYS_BY_MONTH)
|
data/lib/holidays/ca.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
module Holidays
|
2
|
+
# This file is generated by the Ruby Holiday gem.
|
3
|
+
#
|
4
|
+
# Definitions loaded: data/ca.yaml, data/north_america_informal.yaml
|
5
|
+
#
|
6
|
+
# To use the definitions in this file, load them right after you load the
|
7
|
+
# Holiday gem:
|
8
|
+
#
|
9
|
+
# require 'holidays'
|
10
|
+
# require 'holidays/ca'
|
11
|
+
#
|
12
|
+
# More definitions are available at http://code.dunae.ca/holidays.
|
13
|
+
module CA # :nodoc:
|
14
|
+
DEFINED_REGIONS = [:ca, :ca_qc, :ca_nf, :ca_nt, :ca_nu, :ca_ab, :ca_on, :ca_sk, :ca_mb, :ca_bc, :ca_ns, :ca_yk, :us]
|
15
|
+
|
16
|
+
HOLIDAYS_BY_MONTH = {
|
17
|
+
5 => [{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "Victoria Day", :regions => [:ca]},
|
18
|
+
{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "National Patriotes Day", :regions => [:ca_qc]},
|
19
|
+
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
20
|
+
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:ca]},
|
21
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :type => :informal, :name => "Easter Monday", :regions => [:ca]}],
|
22
|
+
11 => [{:mday => 11, :name => "Rememberance Day", :regions => [:ca]}],
|
23
|
+
6 => [{:mday => 24, :name => "Discovery Day", :regions => [:ca_nf]},
|
24
|
+
{:mday => 24, :name => "Fête Nationale", :regions => [:ca_qc]},
|
25
|
+
{:mday => 21, :name => "National Aboriginal Day", :regions => [:ca_nt]}],
|
26
|
+
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ca]},
|
27
|
+
{:mday => 2, :name => "New Year's", :regions => [:ca_qc]}],
|
28
|
+
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ca]},
|
29
|
+
{:mday => 26, :name => "Boxing Day", :regions => [:ca]}],
|
30
|
+
7 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Canada Day", :regions => [:ca]},
|
31
|
+
{:mday => 12, :name => "Orangemen's Day", :regions => [:ca_nf]},
|
32
|
+
{:mday => 9, :name => "Nunavut Day", :regions => [:ca_nu]}],
|
33
|
+
2 => [{:wday => 1, :week => 3, :name => "Family Day", :regions => [:ca_ab, :ca_on, :ca_sk]},
|
34
|
+
{:wday => 1, :week => 3, :name => "Louis Riel Day", :regions => [:ca_mb]},
|
35
|
+
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
36
|
+
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
37
|
+
8 => [{:wday => 1, :week => 1, :name => "BC Day", :regions => [:ca_bc]},
|
38
|
+
{:wday => 1, :week => 1, :name => "Saskatchewan Day", :regions => [:ca_sk]},
|
39
|
+
{:wday => 1, :week => 1, :name => "Heritage Day", :regions => [:ca_ab]},
|
40
|
+
{:wday => 1, :week => 1, :name => "Natal Day", :regions => [:ca_ns]},
|
41
|
+
{:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_on]},
|
42
|
+
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yk]}],
|
43
|
+
3 => [{:mday => 23, :name => "St. George's Day", :regions => [:ca_nf]},
|
44
|
+
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
45
|
+
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]}],
|
46
|
+
4 => [{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
47
|
+
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}],
|
48
|
+
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca]},
|
49
|
+
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}]
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Monday on or before May 24
|
54
|
+
def self.ca_victoria_day(year)
|
55
|
+
date = Date.civil(year,5,24)
|
56
|
+
if date.wday > 1
|
57
|
+
date -= (date.wday - 1)
|
58
|
+
elsif date.wday == 0
|
59
|
+
date -= 6
|
60
|
+
end
|
61
|
+
date
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
Holidays.merge_defs(Holidays::CA::DEFINED_REGIONS, Holidays::CA::HOLIDAYS_BY_MONTH)
|
data/lib/holidays/de.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
module Holidays
|
2
|
+
# This file is generated by the Ruby Holiday gem.
|
3
|
+
#
|
4
|
+
# Definitions loaded: data/de.yaml
|
5
|
+
#
|
6
|
+
# To use the definitions in this file, load them right after you load the
|
7
|
+
# Holiday gem:
|
8
|
+
#
|
9
|
+
# require 'holidays'
|
10
|
+
# require 'holidays/de'
|
11
|
+
#
|
12
|
+
# More definitions are available at http://code.dunae.ca/holidays.
|
13
|
+
module DE # :nodoc:
|
14
|
+
DEFINED_REGIONS = [:de, :de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_sn, :de_he, :de_st, :de_bb, :de_mv, :de_th]
|
15
|
+
|
16
|
+
HOLIDAYS_BY_MONTH = {
|
17
|
+
5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]}],
|
18
|
+
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Karfreitag", :regions => [:de]},
|
19
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:de]},
|
20
|
+
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:de]},
|
21
|
+
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:de]},
|
22
|
+
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl]}],
|
23
|
+
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
|
24
|
+
{:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_sn]}],
|
25
|
+
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:de]},
|
26
|
+
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]}],
|
27
|
+
12 => [{:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
|
28
|
+
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]}],
|
29
|
+
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]}],
|
30
|
+
10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
31
|
+
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]}]
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Germany: Wednesday before November 23
|
36
|
+
def self.de_buss_und_bettag(year)
|
37
|
+
date = Date.civil(year,11,23)
|
38
|
+
if date.wday > 3
|
39
|
+
date -= (date.wday - 3)
|
40
|
+
else
|
41
|
+
date -= (date.wday + 4)
|
42
|
+
end
|
43
|
+
date
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
Holidays.merge_defs(Holidays::DE::DEFINED_REGIONS, Holidays::DE::HOLIDAYS_BY_MONTH)
|
data/lib/holidays/dk.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
module Holidays
|
2
|
+
# This file is generated by the Ruby Holiday gem.
|
3
|
+
#
|
4
|
+
# Definitions loaded: data/dk.yaml
|
5
|
+
#
|
6
|
+
# To use the definitions in this file, load them right after you load the
|
7
|
+
# Holiday gem:
|
8
|
+
#
|
9
|
+
# require 'holidays'
|
10
|
+
# require 'holidays/dk'
|
11
|
+
#
|
12
|
+
# More definitions are available at http://code.dunae.ca/holidays.
|
13
|
+
module DK # :nodoc:
|
14
|
+
DEFINED_REGIONS = [:dk]
|
15
|
+
|
16
|
+
HOLIDAYS_BY_MONTH = {
|
17
|
+
5 => [{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
|
18
|
+
{:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]}],
|
19
|
+
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk]},
|
20
|
+
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk]},
|
21
|
+
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
|
22
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:dk]},
|
23
|
+
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskedag", :regions => [:dk]},
|
24
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:dk]},
|
25
|
+
{:function => lambda { |year| Holidays.easter(year)+26 }, :function_id => "easter(year)+26", :name => "Store Bededag", :regions => [:dk]},
|
26
|
+
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk]},
|
27
|
+
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
|
28
|
+
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]}],
|
29
|
+
11 => [{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]}],
|
30
|
+
6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
|
31
|
+
{:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
|
32
|
+
{:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]}],
|
33
|
+
1 => [{:mday => 1, :name => "Nytårsdag", :regions => [:dk]}],
|
34
|
+
12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
|
35
|
+
{:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
|
36
|
+
{:mday => 25, :name => "1. juledag", :regions => [:dk]},
|
37
|
+
{:mday => 26, :name => "2. juledag", :regions => [:dk]}],
|
38
|
+
4 => [{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
|
39
|
+
{:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
|
40
|
+
{:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]}]
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
Holidays.merge_defs(Holidays::DK::DEFINED_REGIONS, Holidays::DK::HOLIDAYS_BY_MONTH)
|
data/lib/holidays/es.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
module Holidays
|
2
|
+
# This file is generated by the Ruby Holiday gem.
|
3
|
+
#
|
4
|
+
# Definitions loaded: data/es.yaml
|
5
|
+
#
|
6
|
+
# To use the definitions in this file, load them right after you load the
|
7
|
+
# Holiday gem:
|
8
|
+
#
|
9
|
+
# require 'holidays'
|
10
|
+
# require 'holidays/es'
|
11
|
+
#
|
12
|
+
# More definitions are available at http://code.dunae.ca/holidays.
|
13
|
+
module ES # :nodoc:
|
14
|
+
DEFINED_REGIONS = [:es, :es_m, :es_cn, :es_cm, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_mu, :es_lo, :es_ib, :es_ga, :es_an, :es_ce, :es_o, :es_ex, :es_ar, :es_cl]
|
15
|
+
|
16
|
+
HOLIDAYS_BY_MONTH = {
|
17
|
+
5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
|
18
|
+
{:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
|
19
|
+
{:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
|
20
|
+
{:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
|
21
|
+
0 => [{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
|
22
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
|
23
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}],
|
24
|
+
11 => [{:mday => 1, :name => "Todos los Santos", :regions => [:es]}],
|
25
|
+
6 => [{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
|
26
|
+
{:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]}],
|
27
|
+
1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:es]},
|
28
|
+
{:mday => 6, :name => "Día de Reyes", :regions => [:es]}],
|
29
|
+
12 => [{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
|
30
|
+
{:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
|
31
|
+
{:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
|
32
|
+
{:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]}],
|
33
|
+
7 => [{:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]}],
|
34
|
+
2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]}],
|
35
|
+
8 => [{:mday => 15, :name => "Asunción", :regions => [:es]}],
|
36
|
+
3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
|
37
|
+
{:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]}],
|
38
|
+
9 => [{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
|
39
|
+
{:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
|
40
|
+
{:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
|
41
|
+
{:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
|
42
|
+
4 => [{:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
|
43
|
+
{:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]}],
|
44
|
+
10 => [{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
|
45
|
+
{:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]}]
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
Holidays.merge_defs(Holidays::ES::DEFINED_REGIONS, Holidays::ES::HOLIDAYS_BY_MONTH)
|
@@ -0,0 +1,214 @@
|
|
1
|
+
module Holidays
|
2
|
+
# This file is generated by the Ruby Holiday gem.
|
3
|
+
#
|
4
|
+
# Definitions loaded: data/dk.yaml, data/de.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/pt.yaml
|
5
|
+
#
|
6
|
+
# To use the definitions in this file, load them right after you load the
|
7
|
+
# Holiday gem:
|
8
|
+
#
|
9
|
+
# require 'holidays'
|
10
|
+
# require 'holidays/europe'
|
11
|
+
#
|
12
|
+
# More definitions are available at http://code.dunae.ca/holidays.
|
13
|
+
module Europe # :nodoc:
|
14
|
+
DEFINED_REGIONS = [:dk, :de, :de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_sn, :de_he, :de_st, :de_bb, :de_mv, :de_th, :es, :es_m, :es_cn, :es_cm, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_mu, :es_lo, :es_ib, :es_ga, :es_an, :es_ce, :es_o, :es_ex, :es_ar, :es_cl, :fr, :gb, :ie, :je, :gb_jsy, :gg, :gb_gsy, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :im, :gb_iom, :gb_con, :is, :it, :nl, :pt]
|
15
|
+
|
16
|
+
HOLIDAYS_BY_MONTH = {
|
17
|
+
5 => [{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
|
18
|
+
{:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]},
|
19
|
+
{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
|
20
|
+
{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
|
21
|
+
{:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
|
22
|
+
{:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
|
23
|
+
{:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]},
|
24
|
+
{:mday => 1, :name => "Fête du travail", :regions => [:fr]},
|
25
|
+
{:mday => 8, :name => "Victoire 1945", :regions => [:fr]},
|
26
|
+
{:wday => 1, :week => 1, :name => "May Day", :regions => [:gb, :ie]},
|
27
|
+
{:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
|
28
|
+
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]},
|
29
|
+
{:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
|
30
|
+
{:mday => 13, :name => "Mæðradagurinn", :regions => [:is]},
|
31
|
+
{:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]},
|
32
|
+
{:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
|
33
|
+
{:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
|
34
|
+
{:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
|
35
|
+
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk]},
|
36
|
+
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk]},
|
37
|
+
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
|
38
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:dk]},
|
39
|
+
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskedag", :regions => [:dk]},
|
40
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:dk]},
|
41
|
+
{:function => lambda { |year| Holidays.easter(year)+26 }, :function_id => "easter(year)+26", :name => "Store Bededag", :regions => [:dk]},
|
42
|
+
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk]},
|
43
|
+
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
|
44
|
+
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]},
|
45
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Karfreitag", :regions => [:de]},
|
46
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:de]},
|
47
|
+
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:de]},
|
48
|
+
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:de]},
|
49
|
+
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl]},
|
50
|
+
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
|
51
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
|
52
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
|
53
|
+
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pâques", :regions => [:fr]},
|
54
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lundi de Pâques", :regions => [:fr]},
|
55
|
+
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Ascension", :regions => [:fr]},
|
56
|
+
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pentecôte", :regions => [:fr]},
|
57
|
+
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Lundi de Pentecôte", :regions => [:fr]},
|
58
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:gb]},
|
59
|
+
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Easter Sunday", :regions => [:gb]},
|
60
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :ie]},
|
61
|
+
{:function => lambda { |year| Holidays.easter(year)-48 }, :function_id => "easter(year)-48", :name => "Bolludagur", :regions => [:is]},
|
62
|
+
{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :name => "Sprengidagur", :regions => [:is]},
|
63
|
+
{:function => lambda { |year| Holidays.easter(year)-46 }, :function_id => "easter(year)-46", :name => "Öskudagur", :regions => [:is]},
|
64
|
+
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Pálmasunnudagur", :regions => [:is]},
|
65
|
+
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skírdagur", :regions => [:is]},
|
66
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Föstudaginn langi", :regions => [:is]},
|
67
|
+
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páskadagur", :regions => [:is]},
|
68
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Annar í páskum", :regions => [:is]},
|
69
|
+
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Uppstigningardagur", :regions => [:is]},
|
70
|
+
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Hvítasunnudagur", :regions => [:is]},
|
71
|
+
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Annar í hvítasunnu", :regions => [:is]},
|
72
|
+
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasqua", :regions => [:it]},
|
73
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunedì dell'Angelo", :regions => [:it]},
|
74
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Goede Vrijdag", :regions => [:nl]},
|
75
|
+
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasen", :regions => [:nl]},
|
76
|
+
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Pasen", :regions => [:nl]},
|
77
|
+
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Hemelvaartsdag", :regions => [:nl]},
|
78
|
+
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinksteren", :regions => [:nl]},
|
79
|
+
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pinksteren", :regions => [:nl]},
|
80
|
+
{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:pt]},
|
81
|
+
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
|
82
|
+
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
|
83
|
+
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpo de Deus", :regions => [:pt]}],
|
84
|
+
11 => [{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
|
85
|
+
{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
|
86
|
+
{:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_sn]},
|
87
|
+
{:mday => 1, :name => "Todos los Santos", :regions => [:es]},
|
88
|
+
{:mday => 1, :name => "Toussaint", :regions => [:fr]},
|
89
|
+
{:mday => 11, :name => "Armistice 1918", :regions => [:fr]},
|
90
|
+
{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
|
91
|
+
{:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]},
|
92
|
+
{:mday => 1, :name => "Ognissanti", :regions => [:it]},
|
93
|
+
{:mday => 1, :name => "Todos os Santos", :regions => [:pt]}],
|
94
|
+
6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
|
95
|
+
{:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
|
96
|
+
{:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
|
97
|
+
{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
|
98
|
+
{:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]},
|
99
|
+
{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]},
|
100
|
+
{:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
|
101
|
+
{:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
|
102
|
+
{:mday => 2, :name => "Festa della Repubblica", :regions => [:it]},
|
103
|
+
{:mday => 10, :name => "Dia de Portugal", :regions => [:pt]}],
|
104
|
+
1 => [{:mday => 1, :name => "Nytårsdag", :regions => [:dk]},
|
105
|
+
{:mday => 1, :name => "Neujahrstag", :regions => [:de]},
|
106
|
+
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]},
|
107
|
+
{:mday => 1, :name => "Año Nuevo", :regions => [:es]},
|
108
|
+
{:mday => 6, :name => "Día de Reyes", :regions => [:es]},
|
109
|
+
{:mday => 1, :name => "Jour de l'an", :regions => [:fr]},
|
110
|
+
{:mday => 1, :name => "New Year's Day", :regions => [:gb, :ie]},
|
111
|
+
{:mday => 2, :name => "New Year's", :regions => [:gb_sct]},
|
112
|
+
{:mday => 1, :name => "Nýársdagur", :regions => [:is]},
|
113
|
+
{:mday => 6, :name => "Þrettándinn", :regions => [:is]},
|
114
|
+
{:mday => 19, :type => :informal, :name => "Bóndadagur", :regions => [:is]},
|
115
|
+
{:mday => 1, :name => "Capodanno", :regions => [:it]},
|
116
|
+
{:mday => 6, :name => "Epifania", :regions => [:it]},
|
117
|
+
{:mday => 1, :name => "Nieuwjaar", :regions => [:nl]},
|
118
|
+
{:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
|
119
|
+
12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
|
120
|
+
{:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
|
121
|
+
{:mday => 25, :name => "1. juledag", :regions => [:dk]},
|
122
|
+
{:mday => 26, :name => "2. juledag", :regions => [:dk]},
|
123
|
+
{:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
|
124
|
+
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]},
|
125
|
+
{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
|
126
|
+
{:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
|
127
|
+
{:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
|
128
|
+
{:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]},
|
129
|
+
{:mday => 25, :name => "Nöel", :regions => [:fr]},
|
130
|
+
{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:gb]},
|
131
|
+
{:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:gb]},
|
132
|
+
{:mday => 25, :name => "Christmas Day", :regions => [:ie]},
|
133
|
+
{:mday => 26, :name => "St. Stephen's Day", :regions => [:ie]},
|
134
|
+
{:mday => 24, :name => "Jól", :regions => [:is]},
|
135
|
+
{:mday => 25, :name => "Jól", :regions => [:is]},
|
136
|
+
{:mday => 26, :name => "Jól", :regions => [:is]},
|
137
|
+
{:mday => 31, :name => "Gamlárskvöld", :regions => [:is]},
|
138
|
+
{:mday => 8, :name => "Immacolata Concezione", :regions => [:it]},
|
139
|
+
{:mday => 25, :name => "Natale", :regions => [:it]},
|
140
|
+
{:mday => 26, :name => "Santo Stefano", :regions => [:it]},
|
141
|
+
{:mday => 5, :type => :informal, :name => "Sinterklaas", :regions => [:nl]},
|
142
|
+
{:mday => 25, :name => "Kerstmis", :regions => [:nl]},
|
143
|
+
{:mday => 26, :name => "Kerstmis", :regions => [:nl]},
|
144
|
+
{:mday => 1, :name => "Restauração da Independência", :regions => [:pt]},
|
145
|
+
{:mday => 8, :name => "Imaculada Conceição", :regions => [:pt]},
|
146
|
+
{:mday => 25, :name => "Natal", :regions => [:pt]}],
|
147
|
+
7 => [{:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]},
|
148
|
+
{:mday => 14, :name => "Fête nationale", :regions => [:fr]},
|
149
|
+
{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
|
150
|
+
{:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
|
151
|
+
2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]},
|
152
|
+
{:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]}],
|
153
|
+
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]},
|
154
|
+
{:mday => 15, :name => "Asunción", :regions => [:es]},
|
155
|
+
{:mday => 15, :name => "Assomption", :regions => [:fr]},
|
156
|
+
{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct, :ie]},
|
157
|
+
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]},
|
158
|
+
{:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]},
|
159
|
+
{:mday => 15, :name => "Assunzione", :regions => [:it]},
|
160
|
+
{:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]}],
|
161
|
+
3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
|
162
|
+
{:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]},
|
163
|
+
{:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
|
164
|
+
{:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir, :ie]}],
|
165
|
+
9 => [{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
|
166
|
+
{:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
|
167
|
+
{:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
|
168
|
+
{:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
|
169
|
+
4 => [{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
|
170
|
+
{:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
|
171
|
+
{:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]},
|
172
|
+
{:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
|
173
|
+
{:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]},
|
174
|
+
{:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]},
|
175
|
+
{:mday => 25, :name => "Festa della Liberazione", :regions => [:it]},
|
176
|
+
{:mday => 30, :name => "Koninginnedag", :regions => [:nl]},
|
177
|
+
{:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]}],
|
178
|
+
10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
179
|
+
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
|
180
|
+
{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
|
181
|
+
{:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]},
|
182
|
+
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:ie]},
|
183
|
+
{:mday => 5, :name => "Implantação da República", :regions => [:pt]}]
|
184
|
+
}
|
185
|
+
end
|
186
|
+
|
187
|
+
# Iceland: first day of summer (Thursday after 18 April)
|
188
|
+
def self.is_sumardagurinn_fyrsti(year)
|
189
|
+
date = Date.civil(year,4,18)
|
190
|
+
if date.wday < 4
|
191
|
+
date += (4 - date.wday)
|
192
|
+
else date
|
193
|
+
date += (11 - date.wday)
|
194
|
+
end
|
195
|
+
date
|
196
|
+
end
|
197
|
+
|
198
|
+
|
199
|
+
# Germany: Wednesday before November 23
|
200
|
+
def self.de_buss_und_bettag(year)
|
201
|
+
date = Date.civil(year,11,23)
|
202
|
+
if date.wday > 3
|
203
|
+
date -= (date.wday - 3)
|
204
|
+
else
|
205
|
+
date -= (date.wday + 4)
|
206
|
+
end
|
207
|
+
date
|
208
|
+
end
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
end
|
213
|
+
|
214
|
+
Holidays.merge_defs(Holidays::Europe::DEFINED_REGIONS, Holidays::Europe::HOLIDAYS_BY_MONTH)
|