holidays 1.0.6 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +77 -0
  3. data/Gemfile +2 -6
  4. data/{README.rdoc → README.md} +46 -39
  5. data/Rakefile +62 -0
  6. data/data/au.yaml +11 -1
  7. data/data/cl.yaml +92 -0
  8. data/data/de.yaml +24 -0
  9. data/data/dk.yaml +3 -1
  10. data/data/ecb_target.yaml +42 -0
  11. data/data/es.yaml +44 -16
  12. data/data/fr.yaml +15 -10
  13. data/data/gb.yaml +14 -1
  14. data/data/index.yaml +7 -1
  15. data/data/lt.yaml +88 -0
  16. data/data/nl.yaml +10 -10
  17. data/data/se.yaml +26 -3
  18. data/data/sg.yaml +55 -0
  19. data/data/si.yaml +84 -0
  20. data/data/vi.yaml +29 -0
  21. data/holidays.gemspec +17 -187
  22. data/lib/holidays.rb +24 -14
  23. data/lib/holidays/MANIFEST +7 -0
  24. data/lib/holidays/au.rb +9 -9
  25. data/lib/holidays/cl.rb +43 -0
  26. data/lib/holidays/de.rb +1 -1
  27. data/lib/holidays/dk.rb +2 -2
  28. data/lib/holidays/ecb_target.rb +34 -0
  29. data/lib/holidays/es.rb +27 -27
  30. data/lib/holidays/europe.rb +72 -44
  31. data/lib/holidays/fr.rb +2 -2
  32. data/lib/holidays/gb.rb +3 -2
  33. data/lib/holidays/lt.rb +41 -0
  34. data/lib/holidays/nl.rb +1 -1
  35. data/lib/holidays/scandinavia.rb +6 -2
  36. data/lib/holidays/se.rb +7 -3
  37. data/lib/holidays/sg.rb +35 -0
  38. data/lib/holidays/si.rb +42 -0
  39. data/lib/holidays/version.rb +3 -0
  40. data/lib/holidays/vi.rb +32 -0
  41. data/test/defs/test_defs_au.rb +3 -0
  42. data/test/defs/test_defs_cl.rb +39 -0
  43. data/test/defs/test_defs_de.rb +24 -0
  44. data/test/defs/test_defs_dk.rb +1 -0
  45. data/test/defs/test_defs_ecb_target.rb +23 -0
  46. data/test/defs/test_defs_es.rb +7 -2
  47. data/test/defs/test_defs_europe.rb +84 -9
  48. data/test/defs/test_defs_fr.rb +7 -3
  49. data/test/defs/test_defs_gb.rb +7 -0
  50. data/test/defs/test_defs_lt.rb +42 -0
  51. data/test/defs/test_defs_nl.rb +3 -3
  52. data/test/defs/test_defs_scandinavia.rb +10 -2
  53. data/test/defs/test_defs_se.rb +9 -2
  54. data/test/defs/test_defs_sg.rb +20 -0
  55. data/test/defs/test_defs_si.rb +36 -0
  56. data/test/defs/test_defs_vi.rb +18 -0
  57. data/test/test_all_regions.rb +17 -9
  58. metadata +123 -105
  59. data/.travis.yml +0 -15
  60. data/CHANGELOG.rdoc +0 -57
  61. data/rakefile.rb +0 -107
@@ -46,8 +46,6 @@ module Holidays
46
46
  # Exception thrown when an unknown region is requested.
47
47
  class UnknownRegionError < ArgumentError; end
48
48
 
49
- VERSION = '1.0.6'
50
-
51
49
  @@regions = []
52
50
  @@holidays_by_month = {}
53
51
  @@proc_cache = {}
@@ -323,6 +321,19 @@ private
323
321
  return regions, observed, informal
324
322
  end
325
323
 
324
+ # Derive the containing region from a sub region wild-card or a sub region
325
+ # and load its definition. (Common code factored out from parse_regions)
326
+ def self.load_containing_region(sub_reg)
327
+ prefix = sub_reg.split('_').first
328
+ unless @@regions.include?(prefix.to_sym)
329
+ begin
330
+ require "holidays/#{prefix}"
331
+ rescue LoadError
332
+ raise UnknownRegionError, "Could not load holidays/#{prefix}"
333
+ end
334
+ end
335
+ end
336
+
326
337
  # Check regions against list of supported regions and return an array of
327
338
  # symbols.
328
339
  #
@@ -335,17 +346,10 @@ private
335
346
  regions = regions.collect { |r| r.to_sym }
336
347
 
337
348
  # Found sub region wild-card
338
- regions.delete_if do |reg|
339
- if reg.to_s =~ /_$/
340
- prefix = reg.to_s.split('_').first
341
- unless @@regions.include?(prefix.to_sym)
342
- begin
343
- require "holidays/#{prefix}"
344
- rescue LoadError
345
- raise UnknownRegionError, "Could not load holidays/#{prefix}"
346
- end
347
- end
348
- regions << @@regions.select { |dr| dr.to_s =~ Regexp.new("^#{reg}") }
349
+ regions.delete_if do |r|
350
+ if r.to_s =~ /_$/
351
+ load_containing_region(r.to_s)
352
+ regions << @@regions.select { |dr| dr.to_s =~ Regexp.new("^#{r.to_s}") }
349
353
  true
350
354
  end
351
355
  end
@@ -359,7 +363,13 @@ private
359
363
  begin
360
364
  require "holidays/#{r.to_s}"
361
365
  rescue LoadError => e
362
- raise UnknownRegionError, "Could not load holidays/#{r}"
366
+ # This could be a sub region that does not have any holiday
367
+ # definitions of its own; try to load the containing region instead.
368
+ if r.to_s =~ /_/
369
+ load_containing_region(r.to_s)
370
+ else
371
+ raise UnknownRegionError, "Could not load holidays/#{r.to_s}"
372
+ end
363
373
  end
364
374
  end
365
375
  end
@@ -8,9 +8,11 @@ The following definition files are included in this installation:
8
8
  * holidays/br
9
9
  * holidays/ca
10
10
  * holidays/ch
11
+ * holidays/cl
11
12
  * holidays/cz
12
13
  * holidays/de
13
14
  * holidays/dk
15
+ * holidays/ecb_target
14
16
  * holidays/el
15
17
  * holidays/es
16
18
  * holidays/europe
@@ -25,6 +27,7 @@ The following definition files are included in this installation:
25
27
  * holidays/it
26
28
  * holidays/jp
27
29
  * holidays/li
30
+ * holidays/lt
28
31
  * holidays/ma
29
32
  * holidays/mx
30
33
  * holidays/nerc
@@ -38,8 +41,12 @@ The following definition files are included in this installation:
38
41
  * holidays/ro
39
42
  * holidays/scandinavia
40
43
  * holidays/se
44
+ * holidays/sg
45
+ * holidays/si
46
+ * holidays/sk
41
47
  * holidays/united_nations
42
48
  * holidays/ups
43
49
  * holidays/us
44
50
  * holidays/ve
51
+ * holidays/vi
45
52
  * holidays/za
@@ -13,22 +13,22 @@ module Holidays
13
13
  # All the definitions are available at https://github.com/alexdunae/holidays
14
14
  module AU # :nodoc:
15
15
  def self.defined_regions
16
- [:au, :au_nsw, :au_tas, :au_wa, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_qld_brisbane]
16
+ [:au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_qld_brisbane, :au_tas, :au_wa]
17
17
  end
18
18
 
19
19
  def self.holidays_by_month
20
20
  {
21
21
  0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:au]},
22
- {:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Easter Saturday", :regions => [:au]},
22
+ {:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Easter Saturday", :regions => [:au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_qld_brisbane]},
23
23
  {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Easter Sunday", :regions => [:au_nsw]},
24
24
  {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:au]},
25
25
  {:function => lambda { |year| Holidays.easter(year)+2 }, :function_id => "easter(year)+2", :name => "Easter Monday", :regions => [:au_tas]}],
26
- 1 => [{:mday => 1, :name => "New Year's Day", :regions => [:au]},
27
- {:mday => 26, :name => "Australia Day", :regions => [:au]}],
26
+ 1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "New Year's Day", :regions => [:au]},
27
+ {:mday => 26, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Australia Day", :regions => [:au]}],
28
28
  3 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_wa]},
29
29
  {:wday => 1, :week => 2, :name => "Eight Hours Day", :regions => [:au_tas]},
30
30
  {:wday => 1, :week => 2, :name => "Labour Day", :regions => [:au_vic]}],
31
- 4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au]}],
31
+ 4 => [{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "ANZAC Day", :regions => [:au]}],
32
32
  5 => [{:function => lambda { |year| Holidays.qld_labour_day_may(year) }, :function_id => "qld_labour_day_may(year)", :name => "Labour Day", :regions => [:au_qld]},
33
33
  {:wday => 1, :week => 1, :name => "May Day", :regions => [:au_nt]}],
34
34
  6 => [{:wday => 1, :week => 1, :name => "Foundation Day", :regions => [:au_wa]},
@@ -36,10 +36,10 @@ module Holidays
36
36
  {:mday => 6, :type => :informal, :name => "Queensland Day", :regions => [:au_qld]}],
37
37
  8 => [{:wday => 3, :week => -3, :name => "Ekka", :regions => [:au_qld_brisbane]}],
38
38
  10 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_act, :au_nsw, :au_sa]},
39
- {:function => lambda { |year| Holidays.qld_labour_day_october(year) }, :function_id => "qld_labour_day_october(year)", :name => "Labour Day", :regions => [:au_qld]},
40
- {:function => lambda { |year| Holidays.qld_queens_bday_october(year) }, :function_id => "qld_queens_bday_october(year)", :name => "Queen's Birthday", :regions => [:au_qld]}],
41
- 12 => [{:mday => 25, :name => "Christmas Day", :regions => [:au]},
42
- {:mday => 26, :name => "Boxing Day", :regions => [:au]}]
39
+ {:function => lambda { |year| Holidays.qld_labour_day_october(year) }, :function_id => "qld_labour_day_october(year)", :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Labour Day", :regions => [:au_qld]},
40
+ {:function => lambda { |year| Holidays.qld_queens_bday_october(year) }, :function_id => "qld_queens_bday_october(year)", :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Queen's Birthday", :regions => [:au_qld]}],
41
+ 12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:au]},
42
+ {:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:au]}]
43
43
  }
44
44
  end
45
45
  end
@@ -0,0 +1,43 @@
1
+ # encoding: utf-8
2
+ module Holidays
3
+ # This file is generated by the Ruby Holidays gem.
4
+ #
5
+ # Definitions loaded: data/cl.yaml
6
+ #
7
+ # To use the definitions in this file, load it right after you load the
8
+ # Holiday gem:
9
+ #
10
+ # require 'holidays'
11
+ # require 'holidays/cl'
12
+ #
13
+ # All the definitions are available at https://github.com/alexdunae/holidays
14
+ module CL # :nodoc:
15
+ def self.defined_regions
16
+ [:cl]
17
+ end
18
+
19
+ def self.holidays_by_month
20
+ {
21
+ 0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:cl]},
22
+ {:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Sábado Santo", :regions => [:cl]}],
23
+ 1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:cl]}],
24
+ 5 => [{:mday => 1, :name => "Día del Trabajo", :regions => [:cl]},
25
+ {:mday => 21, :name => "Día de las Glorias Navales", :regions => [:cl]}],
26
+ 6 => [{:mday => 29, :name => "San Pedro y San Pablo", :regions => [:cl]}],
27
+ 7 => [{:mday => 16, :name => "Día de la Virgen del Carmen", :regions => [:cl]}],
28
+ 8 => [{:mday => 15, :name => "Asunción de la Virgen", :regions => [:cl]}],
29
+ 9 => [{:mday => 18, :name => "Independencia Nacional", :regions => [:cl]},
30
+ {:mday => 19, :name => "Día de las Glorias del Ejército", :regions => [:cl]}],
31
+ 10 => [{:mday => 12, :name => "Encuentro de Dos Mundos", :regions => [:cl]},
32
+ {:mday => 31, :name => "Día de las Iglesias Evangélicas y Protestantes", :regions => [:cl]}],
33
+ 11 => [{:mday => 1, :name => "Día de Todos los Santos", :regions => [:cl]}],
34
+ 12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:cl]},
35
+ {:mday => 25, :name => "Navidad", :regions => [:cl]}]
36
+ }
37
+ end
38
+ end
39
+
40
+
41
+ end
42
+
43
+ Holidays.merge_defs(Holidays::CL.defined_regions, Holidays::CL.holidays_by_month)
@@ -13,7 +13,7 @@ module Holidays
13
13
  # All the definitions are available at https://github.com/alexdunae/holidays
14
14
  module DE # :nodoc:
15
15
  def self.defined_regions
16
- [:de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_st, :de_bb, :de_mv, :de_sn, :de_th]
16
+ [:de, :de_bw, :de_by, :de_be, :de_bb, :de_hb, :de_hh, :de_he, :de_mv, :de_ni, :de_nw, :de_rp, :de_sl, :de_sn, :de_st, :de_sh, :de_th]
17
17
  end
18
18
 
19
19
  def self.holidays_by_month
@@ -34,12 +34,12 @@ module Holidays
34
34
  {:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]}],
35
35
  5 => [{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
36
36
  {:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]}],
37
- 6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
37
+ 6 => [{:mday => 5, :type => :informal, :name => "Grundlovsdag", :regions => [:dk]},
38
38
  {:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
39
39
  {:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]}],
40
40
  11 => [{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]}],
41
41
  12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
42
- {:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
42
+ {:mday => 24, :type => :informal, :name => "Juleaftensdag", :regions => [:dk]},
43
43
  {:mday => 25, :name => "1. juledag", :regions => [:dk]},
44
44
  {:mday => 26, :name => "2. juledag", :regions => [:dk]}]
45
45
  }
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+ module Holidays
3
+ # This file is generated by the Ruby Holidays gem.
4
+ #
5
+ # Definitions loaded: data/ecb_target.yaml
6
+ #
7
+ # To use the definitions in this file, load it right after you load the
8
+ # Holiday gem:
9
+ #
10
+ # require 'holidays'
11
+ # require 'holidays/ecb_target'
12
+ #
13
+ # All the definitions are available at https://github.com/alexdunae/holidays
14
+ module ECB_TARGET # :nodoc:
15
+ def self.defined_regions
16
+ [:ecb_target]
17
+ end
18
+
19
+ def self.holidays_by_month
20
+ {
21
+ 0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:ecb_target]},
22
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:ecb_target]}],
23
+ 1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ecb_target]}],
24
+ 5 => [{:mday => 1, :name => "Labour Day", :regions => [:ecb_target]}],
25
+ 12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ecb_target]},
26
+ {:mday => 26, :name => "Christmas Holiday", :regions => [:ecb_target]}]
27
+ }
28
+ end
29
+ end
30
+
31
+
32
+ end
33
+
34
+ Holidays.merge_defs(Holidays::ECB_TARGET.defined_regions, Holidays::ECB_TARGET.holidays_by_month)
@@ -13,40 +13,40 @@ module Holidays
13
13
  # All the definitions are available at https://github.com/alexdunae/holidays
14
14
  module ES # :nodoc:
15
15
  def self.defined_regions
16
- [:es_pv, :es_ct, :es_na, :es_v, :es_vc, :es, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex]
16
+ [:es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_an, :es, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex]
17
17
  end
18
18
 
19
19
  def self.holidays_by_month
20
20
  {
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]},
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, :es_an]},
22
22
  {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
23
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
- 1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:es]},
25
- {:mday => 6, :name => "Día de Reyes", :regions => [:es]}],
26
- 2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]}],
27
- 3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
28
- {:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]}],
29
- 4 => [{:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
30
- {:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]}],
31
- 5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
32
- {:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
33
- {:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
34
- {:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
35
- 6 => [{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
36
- {:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]}],
37
- 7 => [{:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]}],
38
- 8 => [{:mday => 15, :name => "Asunción", :regions => [:es]}],
39
- 9 => [{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
40
- {:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
24
+ 1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Año Nuevo", :regions => [:es]},
25
+ {:mday => 6, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Reyes", :regions => [:es]}],
26
+ 2 => [{:mday => 28, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Andalucía", :regions => [:es_an]}],
27
+ 3 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de las Islas Baleares", :regions => [:es_ib]},
28
+ {:mday => 19, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]}],
29
+ 4 => [{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San Jorge", :regions => [:es_ar, :es_cl]},
30
+ {:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Aragón", :regions => [:es_ar]}],
31
+ 5 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día del Trabajador", :regions => [:es]},
32
+ {:mday => 2, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Fiesta de la Comunidad", :regions => [:es_m]},
33
+ {:mday => 30, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de las Canarias", :regions => [:es_cn]},
34
+ {:mday => 31, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
35
+ 6 => [{:mday => 9, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de la Región de Murcia", :regions => [:es_mu]},
36
+ {:mday => 9, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de La Rioja", :regions => [:es_lo]}],
37
+ 7 => [{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Santiago Apostol", :regions => [:es_ga]}],
38
+ 8 => [{:mday => 15, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Asunción", :regions => [:es]}],
39
+ 9 => [{:mday => 2, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Ceuta", :regions => [:es_ce]},
40
+ {:mday => 8, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Asturias", :regions => [:es_o]},
41
41
  {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
42
- {:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
43
- 10 => [{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
44
- {:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]}],
45
- 11 => [{:mday => 1, :name => "Todos los Santos", :regions => [:es]}],
46
- 12 => [{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
47
- {:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
48
- {:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
49
- {:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]}]
42
+ {:mday => 11, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
43
+ 10 => [{:mday => 9, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
44
+ {:mday => 12, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de la Hispanidad", :regions => [:es]}],
45
+ 11 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Todos los Santos", :regions => [:es]}],
46
+ 12 => [{:mday => 6, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de la Constitución", :regions => [:es]},
47
+ {:mday => 8, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Inmaculada Concepción", :regions => [:es]},
48
+ {:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Navidad del Señor", :regions => [:es]},
49
+ {:mday => 26, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San Esteban", :regions => [:es_ib, :es_ct]}]
50
50
  }
51
51
  end
52
52
  end
@@ -2,7 +2,7 @@
2
2
  module Holidays
3
3
  # This file is generated by the Ruby Holidays gem.
4
4
  #
5
- # Definitions loaded: data/at.yaml, data/be.yaml, data/ch.yaml, data/cz.yaml, data/dk.yaml, data/de.yaml, data/el.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/hr.yaml, data/hu.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/li.yaml, data/nl.yaml, data/no.yaml, data/pl.yaml, data/pt.yaml, data/ro.yaml, data/sk.yaml
5
+ # Definitions loaded: data/at.yaml, data/be.yaml, data/ch.yaml, data/cz.yaml, data/dk.yaml, data/de.yaml, data/el.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/hr.yaml, data/hu.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/li.yaml, data/lt.yaml, data/nl.yaml, data/no.yaml, data/pl.yaml, data/pt.yaml, data/ro.yaml, data/sk.yaml, data/si.yaml
6
6
  #
7
7
  # To use the definitions in this file, load it right after you load the
8
8
  # Holiday gem:
@@ -13,7 +13,7 @@ module Holidays
13
13
  # All the definitions are available at https://github.com/alexdunae/holidays
14
14
  module Europe # :nodoc:
15
15
  def self.defined_regions
16
- [:at, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_vs, :ch_ge, :ch_ju, :de, :li, :ch_ne, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_st, :be, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :ie, :fr, :ch, :cz, :dk, :no, :de_bb, :de_mv, :de_sn, :de_th, :el, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex, :gb, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom, :hr, :hu, :is, :it, :nl, :pl, :pt, :ro, :sk]
16
+ [:at, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_vs, :ch_ge, :ch_ju, :de, :li, :ch_ne, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_st, :be, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :ie, :fr, :ch, :cz, :dk, :no, :de_bb, :de_mv, :de_sn, :de_th, :el, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_an, :es, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex, :gb, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom, :hr, :hu, :is, :it, :lt, :nl, :pl, :pt, :ro, :sk, :si]
17
17
  end
18
18
 
19
19
  def self.holidays_by_month
@@ -48,12 +48,12 @@ module Holidays
48
48
  {:function => lambda { |year| Holidays.orthodox_easter(year)+1 }, :function_id => "orthodox_easter(year)+1", :name => "Δευτέρα του Πάσχα", :regions => [:el]},
49
49
  {:function => lambda { |year| Holidays.orthodox_easter(year)-48 }, :function_id => "orthodox_easter(year)-48", :name => "Καθαρά Δευτέρα", :regions => [:el]},
50
50
  {:function => lambda { |year| Holidays.orthodox_easter(year)+50 }, :function_id => "orthodox_easter(year)+50", :name => "Αγίου Πνεύματος", :regions => [:el]},
51
- {: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)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_an]},
52
52
  {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
53
53
  {: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]},
54
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pâques", :regions => [:fr]},
54
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :type => :informal, :name => "Pâques", :regions => [:fr]},
55
55
  {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lundi de Pâques", :regions => [:fr]},
56
- {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pentecôte", :regions => [:fr]},
56
+ {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :type => :informal, :name => "Pentecôte", :regions => [:fr]},
57
57
  {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Lundi de Pentecôte", :regions => [:fr]},
58
58
  {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:gb]},
59
59
  {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Easter Sunday", :regions => [:gb]},
@@ -77,6 +77,8 @@ module Holidays
77
77
  {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunedì dell'Angelo", :regions => [:it]},
78
78
  {:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :name => "Fasnachtsdienstag", :regions => [:li]},
79
79
  {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :type => :informal, :name => "Ostern", :regions => [:li]},
80
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Šv. Velykos", :regions => [:lt]},
81
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Antroji Velykų diena", :regions => [:lt]},
80
82
  {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Goede Vrijdag", :regions => [:nl]},
81
83
  {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasen", :regions => [:nl]},
82
84
  {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Pasen", :regions => [:nl]},
@@ -106,7 +108,10 @@ module Holidays
106
108
  {:function => lambda { |year| Holidays.orthodox_easter(year) + 49 }, :function_id => "orthodox_easter(year) + 49", :name => "Rusaliile", :regions => [:ro]},
107
109
  {:function => lambda { |year| Holidays.orthodox_easter(year) + 50 }, :function_id => "orthodox_easter(year) + 50", :name => "Rusaliile", :regions => [:ro]},
108
110
  {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Veľkonočný pondelok", :regions => [:sk]},
109
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Veľký piatok", :regions => [:sk]}],
111
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Veľký piatok", :regions => [:sk]},
112
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "velikonočna nedelja", :regions => [:si]},
113
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "velikonočni ponedeljek", :regions => [:si]},
114
+ {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "binkošti", :regions => [:si]}],
110
115
  1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:at, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_vd, :ch_vs, :ch_ne, :ch_ge, :ch_ju, :ch_ti, :de, :li]},
111
116
  {:mday => 6, :name => "Heilige Drei Könige", :regions => [:at, :de_bw, :de_by, :de_st, :li, :li]},
112
117
  {:mday => 1, :name => "New Year's Day", :regions => [:be]},
@@ -116,11 +121,11 @@ module Holidays
116
121
  {:mday => 1, :name => "Nytårsdag", :regions => [:dk]},
117
122
  {:mday => 1, :name => "Πρωτοχρονιά", :regions => [:el]},
118
123
  {:mday => 6, :name => "Θεοφάνεια", :regions => [:el]},
119
- {:mday => 1, :name => "Año Nuevo", :regions => [:es]},
120
- {:mday => 6, :name => "Día de Reyes", :regions => [:es]},
124
+ {:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Año Nuevo", :regions => [:es]},
125
+ {:mday => 6, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Reyes", :regions => [:es]},
121
126
  {:mday => 1, :name => "Jour de l'an", :regions => [:fr]},
122
127
  {:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "New Year's Day", :regions => [:gb, :ie]},
123
- {:mday => 2, :name => "New Year's", :regions => [:gb_sct]},
128
+ {:mday => 2, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "2nd January", :regions => [:gb_sct]},
124
129
  {:mday => 1, :name => "Nova godina", :regions => [:hr]},
125
130
  {:mday => 6, :name => "Sveta tri kralja", :regions => [:hr]},
126
131
  {:mday => 1, :name => "Újév", :regions => [:hu]},
@@ -129,6 +134,7 @@ module Holidays
129
134
  {:mday => 19, :type => :informal, :name => "Bóndadagur", :regions => [:is]},
130
135
  {:mday => 1, :name => "Capodanno", :regions => [:it]},
131
136
  {:mday => 6, :name => "Epifania", :regions => [:it]},
137
+ {:mday => 1, :name => "Naujieji metai", :regions => [:lt]},
132
138
  {:mday => 1, :name => "Nieuwjaar", :regions => [:nl]},
133
139
  {:mday => 1, :name => "Nyttårsdag", :regions => [:no]},
134
140
  {:mday => 1, :name => "Nowy Rok", :regions => [:pl]},
@@ -139,7 +145,8 @@ module Holidays
139
145
  {:mday => 1, :name => "Ano Novo", :regions => [:pt]},
140
146
  {:mday => 1, :name => "Anul nou", :regions => [:ro]},
141
147
  {:mday => 2, :name => "Anul nou", :regions => [:ro]},
142
- {:mday => 1, :name => "Nový rok", :regions => [:sk]}],
148
+ {:mday => 1, :name => "Nový rok", :regions => [:sk]},
149
+ {:mday => 1, :name => "novo leto", :regions => [:si]}],
143
150
  5 => [{:mday => 1, :name => "Staatsfeiertag", :regions => [:at]},
144
151
  {:mday => 1, :name => "Labour Day", :regions => [:be]},
145
152
  {:mday => 1, :name => "Tag der Arbeit", :regions => [:ch_zh, :ch_bs, :ch_bl, :ch_sh, :ch_ag, :ch_tg, :ch_ti, :ch_ne, :ch_ju, :de, :li]},
@@ -148,10 +155,10 @@ module Holidays
148
155
  {:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
149
156
  {:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]},
150
157
  {:mday => 1, :name => "Πρωτομαγιά", :regions => [:el]},
151
- {:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
152
- {:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
153
- {:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
154
- {:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]},
158
+ {:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día del Trabajador", :regions => [:es]},
159
+ {:mday => 2, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Fiesta de la Comunidad", :regions => [:es_m]},
160
+ {:mday => 30, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de las Canarias", :regions => [:es_cn]},
161
+ {:mday => 31, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]},
155
162
  {:mday => 1, :name => "Fête du travail", :regions => [:fr]},
156
163
  {:mday => 8, :name => "Victoire 1945", :regions => [:fr]},
157
164
  {:wday => 1, :week => 1, :name => "May Day", :regions => [:gb, :ie]},
@@ -162,6 +169,7 @@ module Holidays
162
169
  {:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
163
170
  {:mday => 13, :name => "Mæðradagurinn", :regions => [:is]},
164
171
  {:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]},
172
+ {:mday => 1, :name => "Darbininkų diena", :regions => [:lt]},
165
173
  {:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
166
174
  {:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
167
175
  {:mday => 1, :name => "1. mai", :regions => [:no]},
@@ -172,12 +180,14 @@ module Holidays
172
180
  {:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]},
173
181
  {:mday => 1, :name => "Ziua muncii", :regions => [:ro]},
174
182
  {:mday => 1, :name => "Sviatok práce", :regions => [:sk]},
175
- {:mday => 8, :name => "Deň víťazstva", :regions => [:sk]}],
183
+ {:mday => 8, :name => "Deň víťazstva", :regions => [:sk]},
184
+ {:mday => 1, :name => "praznik dela", :regions => [:si]},
185
+ {:mday => 2, :name => "praznik dela", :regions => [:si]}],
176
186
  8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:at, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_ag, :ch_ti, :ch_vs, :ch_ju, :de_by, :de_sl]},
177
187
  {:mday => 15, :name => "Assumption of Mary", :regions => [:be]},
178
188
  {:mday => 1, :name => "Bundesfeiertag", :regions => [:ch]},
179
189
  {:mday => 15, :name => "Κοίμηση της Θεοτόκου", :regions => [:el]},
180
- {:mday => 15, :name => "Asunción", :regions => [:es]},
190
+ {:mday => 15, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Asunción", :regions => [:es]},
181
191
  {:mday => 15, :name => "Assomption", :regions => [:fr]},
182
192
  {:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
183
193
  {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]},
@@ -188,43 +198,49 @@ module Holidays
188
198
  {:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]},
189
199
  {:mday => 15, :name => "Assunzione", :regions => [:it]},
190
200
  {:mday => 15, :name => "Staatsfeiertag", :regions => [:li]},
201
+ {:mday => 15, :name => "Žolinė", :regions => [:lt]},
191
202
  {:mday => 15, :name => "Wniebowzięcie Najświętszej Maryi Panny", :regions => [:pl]},
192
203
  {:mday => 15, :name => "Święto Wojska Polskiego", :regions => [:pl]},
193
204
  {:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]},
194
205
  {:mday => 15, :name => "Adormirea Maicii Domnului", :regions => [:ro]},
195
- {:mday => 29, :name => "Výročie Slovenského národného povstania", :regions => [:sk]}],
206
+ {:mday => 29, :name => "Výročie Slovenského národného povstania", :regions => [:sk]},
207
+ {:mday => 15, :name => "Marijino vnebovzetje", :regions => [:si]}],
196
208
  10 => [{:mday => 26, :name => "Nationalfeiertag", :regions => [:at]},
197
209
  {:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]},
198
210
  {:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
199
211
  {:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
200
212
  {:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]},
201
- {:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
202
- {:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]},
213
+ {:mday => 9, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
214
+ {:mday => 12, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de la Hispanidad", :regions => [:es]},
203
215
  {:mday => 8, :name => "Dan neovisnosti", :regions => [:hr]},
204
216
  {:mday => 23, :name => "1956-os forradalom és szabadságharc ünnepe", :regions => [:hu]},
205
217
  {:wday => 1, :week => -1, :name => "October Bank Holiday", :regions => [:ie]},
206
- {:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]}],
218
+ {:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]},
219
+ {:mday => 31, :name => "dan reformacije", :regions => [:si]}],
207
220
  11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:at, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_sg, :ch_ag, :ch_ti, :ch_vs, :ch_ju, :de_bw, :de_by, :de_nw, :de_rp, :de_sl, :li]},
208
221
  {:mday => 1, :name => "All Saints", :regions => [:be]},
209
222
  {:mday => 11, :name => "Armistice Day", :regions => [:be]},
210
223
  {:mday => 17, :name => "Den boje za svobodu a demokracii", :regions => [:cz]},
211
224
  {:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
212
225
  {:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_sn]},
213
- {:mday => 1, :name => "Todos los Santos", :regions => [:es]},
226
+ {:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Todos los Santos", :regions => [:es]},
214
227
  {:mday => 1, :name => "Toussaint", :regions => [:fr]},
215
228
  {:mday => 11, :name => "Armistice 1918", :regions => [:fr]},
216
229
  {:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
230
+ {:mday => 30, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :type => :informal, :name => "St. Andrew's Day", :regions => [:gb_sct]},
217
231
  {:mday => 1, :name => "Dan svih svetih", :regions => [:hr]},
218
232
  {:mday => 1, :name => "Mindenszentek", :regions => [:hu]},
219
233
  {:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]},
220
234
  {:mday => 1, :name => "Ognissanti", :regions => [:it]},
235
+ {:mday => 1, :name => "Visų šventųjų diena", :regions => [:lt]},
221
236
  {:mday => 1, :name => "Wszystkich Świętych", :regions => [:pl]},
222
237
  {:mday => 2, :type => :informal, :name => "Dzień Zaduszny", :regions => [:pl]},
223
238
  {:mday => 11, :name => "Narodowe Święto Niepodległości", :regions => [:pl]},
224
239
  {:mday => 29, :type => :informal, :name => "Andrzejki", :regions => [:pl]},
225
240
  {:mday => 30, :name => "Sfântul Apostol Andrei", :regions => [:ro]},
226
241
  {:mday => 1, :name => "Sviatok všetkých svätých", :regions => [:sk]},
227
- {:mday => 17, :name => "Deň boja za slobodu a demokraciu", :regions => [:sk]}],
242
+ {:mday => 17, :name => "Deň boja za slobodu a demokraciu", :regions => [:sk]},
243
+ {:mday => 1, :name => "dan spomina na mrtve", :regions => [:si]}],
228
244
  12 => [{:mday => 8, :name => "Mariä Empfägnis", :regions => [:at]},
229
245
  {:mday => 25, :name => "1. Weihnachtstag", :regions => [:at, :de]},
230
246
  {:mday => 26, :name => "2. Weihnachtstag", :regions => [:at, :de]},
@@ -237,15 +253,15 @@ module Holidays
237
253
  {:mday => 25, :name => "1. svátek vánoční", :regions => [:cz]},
238
254
  {:mday => 26, :name => "2. svátek vánoční", :regions => [:cz]},
239
255
  {:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
240
- {:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
256
+ {:mday => 24, :type => :informal, :name => "Juleaftensdag", :regions => [:dk]},
241
257
  {:mday => 25, :name => "1. juledag", :regions => [:dk, :no]},
242
258
  {:mday => 26, :name => "2. juledag", :regions => [:dk, :no]},
243
259
  {:mday => 25, :name => "Χριστούγεννα", :regions => [:el]},
244
260
  {:mday => 26, :name => "Δεύτερη ημέρα των Χριστουγέννων", :regions => [:el]},
245
- {:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
246
- {:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
247
- {:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
248
- {:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]},
261
+ {:mday => 6, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de la Constitución", :regions => [:es]},
262
+ {:mday => 8, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Inmaculada Concepción", :regions => [:es]},
263
+ {:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Navidad del Señor", :regions => [:es]},
264
+ {:mday => 26, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San Esteban", :regions => [:es_ib, :es_ct]},
249
265
  {:mday => 25, :name => "Noël", :regions => [:fr]},
250
266
  {:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:gb, :ie]},
251
267
  {:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:gb]},
@@ -263,6 +279,9 @@ module Holidays
263
279
  {:mday => 26, :name => "Santo Stefano", :regions => [:it]},
264
280
  {:mday => 24, :name => "Heilig Abend", :regions => [:li]},
265
281
  {:mday => 31, :name => "Silvester", :regions => [:li]},
282
+ {:mday => 24, :name => "Šv. Kūčios", :regions => [:lt]},
283
+ {:mday => 25, :name => "Šv. Kalėdos", :regions => [:lt]},
284
+ {:mday => 26, :name => "Antroji Kalėdų diena", :regions => [:lt]},
266
285
  {:mday => 5, :type => :informal, :name => "Sinterklaas", :regions => [:nl]},
267
286
  {:mday => 25, :name => "Kerstmis", :regions => [:nl]},
268
287
  {:mday => 26, :name => "Kerstmis", :regions => [:nl]},
@@ -281,70 +300,79 @@ module Holidays
281
300
  {:mday => 26, :name => "Sărbătoarea Nașterii Domnului", :regions => [:ro]},
282
301
  {:mday => 24, :name => "Štedrý deň", :regions => [:sk]},
283
302
  {:mday => 25, :name => "1. sviatok vianočný", :regions => [:sk]},
284
- {:mday => 26, :name => "2. sviatek vianočný", :regions => [:sk]}],
303
+ {:mday => 26, :name => "2. sviatek vianočný", :regions => [:sk]},
304
+ {:mday => 25, :name => "božič", :regions => [:si]},
305
+ {:mday => 26, :name => "dan samostojnosti in enotnosti", :regions => [:si]}],
285
306
  7 => [{:mday => 21, :name => "National holiday", :regions => [:be]},
286
307
  {:mday => 5, :name => "Den slovanských věrozvěstů Cyrila a Metoděje", :regions => [:cz]},
287
308
  {:mday => 6, :name => "Den upálení mistra Jana Husa", :regions => [:cz]},
288
- {:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]},
309
+ {:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Santiago Apostol", :regions => [:es_ga]},
289
310
  {:mday => 14, :name => "Fête nationale", :regions => [:fr]},
290
311
  {:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
291
312
  {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]},
313
+ {:mday => 6, :name => "Valstybės diena", :regions => [:lt]},
292
314
  {:mday => 5, :name => "Sviatok svätého Cyrila a svätého Metoda", :regions => [:sk]}],
293
315
  3 => [{:mday => 1, :name => "Instauration de la République", :regions => [:ch_ne]},
294
316
  {:mday => 19, :name => "Josephstag", :regions => [:ch_ur, :ch_sz, :ch_nw, :ch_ti, :ch_vs]},
295
317
  {:mday => 25, :name => "Επέτειος της Επανάστασης του 1821", :regions => [:el]},
296
- {:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
297
- {:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]},
318
+ {:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de las Islas Baleares", :regions => [:es_ib]},
319
+ {:mday => 19, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]},
298
320
  {:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
299
321
  {:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir]},
300
322
  {:mday => 15, :name => "1848/49-es forradalom és szabadságharc ünnepe", :regions => [:hu]},
301
323
  {:mday => 17, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "St. Patrick's Day", :regions => [:ie]},
302
324
  {:mday => 19, :name => "St. Josef", :regions => [:li]},
325
+ {:mday => 11, :name => "Nepriklausomybės atkūrimo diena", :regions => [:lt]},
303
326
  {:mday => 8, :type => :informal, :name => "Dzień Kobiet", :regions => [:pl]},
304
327
  {:mday => 10, :type => :informal, :name => "Dzień Mężczyzn", :regions => [:pl]}],
305
328
  4 => [{:function => lambda { |year| Holidays.ch_gl_naefelser_fahrt(year) }, :function_id => "ch_gl_naefelser_fahrt(year)", :name => "Näfelser Fahrt", :regions => [:ch_gl]},
306
329
  {:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
307
330
  {:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
308
331
  {:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]},
309
- {:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
310
- {:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]},
332
+ {:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San Jorge", :regions => [:es_ar, :es_cl]},
333
+ {:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Aragón", :regions => [:es_ar]},
311
334
  {:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]},
312
335
  {:mday => 25, :name => "Festa della Liberazione", :regions => [:it]},
313
- {:mday => 30, :name => "Koninginnedag", :regions => [:nl]},
336
+ {:mday => 27, :name => "Koningsdag", :regions => [:nl]},
314
337
  {:mday => 1, :type => :informal, :name => "Prima Aprilis", :regions => [:pl]},
315
338
  {:mday => 22, :type => :informal, :name => "Międzynarodowy Dzień Ziemi", :regions => [:pl]},
316
- {:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]}],
339
+ {:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]},
340
+ {:mday => 27, :name => "dan upora proti okupatorju", :regions => [:si]}],
317
341
  6 => [{:mday => 23, :name => "Commémoration du plébiscite jurassien", :regions => [:ch_ju]},
318
342
  {:mday => 29, :name => "San Pietro e Paolo", :regions => [:ch_ti]},
319
- {:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
343
+ {:mday => 5, :type => :informal, :name => "Grundlovsdag", :regions => [:dk]},
320
344
  {:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
321
345
  {:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
322
- {:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
323
- {:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]},
346
+ {:mday => 9, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de la Región de Murcia", :regions => [:es_mu]},
347
+ {:mday => 9, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de La Rioja", :regions => [:es_lo]},
324
348
  {:mday => 22, :name => "Dan antifašističke borbe", :regions => [:hr]},
325
349
  {:mday => 25, :name => "Dan državnosti", :regions => [:hr]},
326
350
  {:wday => 1, :week => 1, :name => "June Bank Holiday", :regions => [:ie]},
327
351
  {:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
328
352
  {:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
329
353
  {:mday => 2, :name => "Festa della Repubblica", :regions => [:it]},
354
+ {:mday => 24, :name => "Joninės", :regions => [:lt]},
330
355
  {:mday => 23, :type => :informal, :name => "Dzień Ojca", :regions => [:pl]},
331
- {:mday => 10, :name => "Dia de Portugal", :regions => [:pt]}],
356
+ {:mday => 10, :name => "Dia de Portugal", :regions => [:pt]},
357
+ {:mday => 25, :name => "dan državnosti", :regions => [:si]}],
332
358
  9 => [{:mday => 22, :name => "Mauritiustag", :regions => [:ch_ai]},
333
359
  {:mday => 25, :name => "Bruderklausenfest", :regions => [:ch_ow]},
334
360
  {:mday => 28, :name => "Den české státnosti", :regions => [:cz]},
335
- {:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
336
- {:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
361
+ {:mday => 2, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Ceuta", :regions => [:es_ce]},
362
+ {:mday => 8, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Asturias", :regions => [:es_o]},
337
363
  {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
338
- {:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]},
364
+ {:mday => 11, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]},
339
365
  {:mday => 8, :name => "Maria Geburt", :regions => [:li]},
340
366
  {:mday => 30, :type => :informal, :name => "Dzień Chłopaka", :regions => [:pl]},
341
367
  {:mday => 1, :name => "Deň Ústavy Slovenskej republiky", :regions => [:sk]},
342
368
  {:mday => 15, :name => "Sedembolestná Panna Mária", :regions => [:sk]}],
343
- 2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]},
369
+ 2 => [{:mday => 28, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Andalucía", :regions => [:es_an]},
344
370
  {:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]},
345
371
  {:mday => 2, :name => "Maria Lichtmess", :regions => [:li]},
372
+ {:mday => 16, :name => "Valstybės atkūrimo diena", :regions => [:lt]},
346
373
  {:mday => 2, :type => :informal, :name => "Ofiarowanie Pańskie (Matki Boskiej Gromnicznej)", :regions => [:pl]},
347
- {:mday => 14, :type => :informal, :name => "Dzień Zakochanych (Walentynki)", :regions => [:pl]}]
374
+ {:mday => 14, :type => :informal, :name => "Dzień Zakochanych (Walentynki)", :regions => [:pl]},
375
+ {:mday => 8, :name => "Prešernov dan, slovenski kulturni praznik", :regions => [:si]}]
348
376
  }
349
377
  end
350
378
  end