bjeanes-holidays 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/CHANGELOG +15 -0
  2. data/LICENSE +21 -0
  3. data/README.rdoc +77 -0
  4. data/REFERENCES +16 -0
  5. data/data/SYNTAX +111 -0
  6. data/data/au.yaml +111 -0
  7. data/data/build_defs.rb +152 -0
  8. data/data/ca.yaml +141 -0
  9. data/data/de.yaml +111 -0
  10. data/data/dk.yaml +117 -0
  11. data/data/es.yaml +161 -0
  12. data/data/fr.yaml +70 -0
  13. data/data/gb.yaml +106 -0
  14. data/data/ie.yaml +58 -0
  15. data/data/index.yaml +23 -0
  16. data/data/is.yaml +136 -0
  17. data/data/it.yaml +66 -0
  18. data/data/mx.yaml +106 -0
  19. data/data/nl.yaml +67 -0
  20. data/data/north_america_informal.yaml +49 -0
  21. data/data/nyse.yaml +63 -0
  22. data/data/pt.yaml +85 -0
  23. data/data/se.yaml +91 -0
  24. data/data/united_nations.yaml +188 -0
  25. data/data/ups.yaml +56 -0
  26. data/data/us.yaml +81 -0
  27. data/data/za.yaml +78 -0
  28. data/lib/holidays.rb +404 -0
  29. data/lib/holidays/MANIFEST +25 -0
  30. data/lib/holidays/au.rb +42 -0
  31. data/lib/holidays/ca.rb +68 -0
  32. data/lib/holidays/de.rb +50 -0
  33. data/lib/holidays/dk.rb +47 -0
  34. data/lib/holidays/es.rb +52 -0
  35. data/lib/holidays/europe.rb +214 -0
  36. data/lib/holidays/fr.rb +36 -0
  37. data/lib/holidays/gb.rb +40 -0
  38. data/lib/holidays/ie.rb +32 -0
  39. data/lib/holidays/is.rb +61 -0
  40. data/lib/holidays/it.rb +35 -0
  41. data/lib/holidays/mx.rb +51 -0
  42. data/lib/holidays/nl.rb +36 -0
  43. data/lib/holidays/north_america.rb +107 -0
  44. data/lib/holidays/nyse.rb +32 -0
  45. data/lib/holidays/pt.rb +43 -0
  46. data/lib/holidays/scandinavia.rb +114 -0
  47. data/lib/holidays/se.rb +52 -0
  48. data/lib/holidays/united_nations.rb +24 -0
  49. data/lib/holidays/ups.rb +31 -0
  50. data/lib/holidays/us.rb +48 -0
  51. data/lib/holidays/za.rb +35 -0
  52. data/rakefile.rb +150 -0
  53. data/test/defs/test_defs_au.rb +36 -0
  54. data/test/defs/test_defs_ca.rb +29 -0
  55. data/test/defs/test_defs_de.rb +49 -0
  56. data/test/defs/test_defs_dk.rb +30 -0
  57. data/test/defs/test_defs_es.rb +57 -0
  58. data/test/defs/test_defs_europe.rb +243 -0
  59. data/test/defs/test_defs_fr.rb +26 -0
  60. data/test/defs/test_defs_gb.rb +36 -0
  61. data/test/defs/test_defs_ie.rb +21 -0
  62. data/test/defs/test_defs_is.rb +33 -0
  63. data/test/defs/test_defs_it.rb +25 -0
  64. data/test/defs/test_defs_mx.rb +22 -0
  65. data/test/defs/test_defs_nl.rb +24 -0
  66. data/test/defs/test_defs_north_america.rb +54 -0
  67. data/test/defs/test_defs_nyse.rb +22 -0
  68. data/test/defs/test_defs_pt.rb +56 -0
  69. data/test/defs/test_defs_scandinavia.rb +75 -0
  70. data/test/defs/test_defs_se.rb +32 -0
  71. data/test/defs/test_defs_ups.rb +21 -0
  72. data/test/defs/test_defs_us.rb +23 -0
  73. data/test/defs/test_defs_za.rb +25 -0
  74. metadata +132 -0
@@ -0,0 +1,36 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/au'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: data/au.yaml
7
+ class AuDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_au
10
+ {Date.civil(2007,1,1) => 'New Year\'s Day',
11
+ Date.civil(2007,1,26) => 'Australia Day',
12
+ Date.civil(2007,4,6) => 'Good Friday',
13
+ Date.civil(2007,4,9) => 'Easter Monday',
14
+ Date.civil(2007,4,25) => 'ANZAC Day',
15
+ Date.civil(2007,12,25) => 'Christmas Day',
16
+ Date.civil(2007,12,26) => 'Boxing Day'}.each do |date, name|
17
+ assert_equal name, Holidays.on(date, :au, :informal)[0][:name]
18
+ end
19
+
20
+ [:au_sa, :au_act, :au_nsw, :au_].each do |r|
21
+ assert_equal 'Labour Day', Date.civil(2007,10,1).holidays(r)[0][:name]
22
+ end
23
+
24
+ [:au_sa, :au_act, :au_nsw, :au_vic, :au_tas, :au_qld, :au_nt, :au_].each do |r|
25
+ assert_equal 'Queen\'s Birthday', Date.civil(2007,6,11).holidays(r)[0][:name]
26
+ end
27
+
28
+ assert_equal 'Labour Day', Date.civil(2007,3,5).holidays(:au_wa)[0][:name]
29
+ assert_equal 'Labour Day', Date.civil(2007,3,12).holidays(:au_vic)[0][:name]
30
+ assert_equal 'Labour Day', Date.civil(2007,5,7).holidays(:au_qld)[0][:name]
31
+
32
+ assert_equal 'May Day', Date.civil(2007,5,7).holidays(:au_nt)[0][:name]
33
+
34
+ assert_equal 'Eight Hours Day', Date.civil(2007,3,12).holidays(:au_tas)[0][:name]
35
+ end
36
+ end
@@ -0,0 +1,29 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/ca'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: data/ca.yaml, data/north_america_informal.yaml
7
+ class CaDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_ca
10
+ {Date.civil(2008,1,1) => 'New Year\'s Day',
11
+ Date.civil(2008,3,21) => 'Good Friday',
12
+ Date.civil(2008,3,24) => 'Easter Monday',
13
+ Date.civil(2008,5,19) => 'Victoria Day',
14
+ Date.civil(2008,7,1) => 'Canada Day',
15
+ Date.civil(2008,9,1) => 'Labour Day',
16
+ Date.civil(2008,10,13) => 'Thanksgiving',
17
+ Date.civil(2008,11,11) => 'Rememberance Day',
18
+ Date.civil(2008,12,25) => 'Christmas Day',
19
+ Date.civil(2008,12,26) => 'Boxing Day'}.each do |date, name|
20
+ assert_equal name, Holidays.on(date, :ca, :informal)[0][:name]
21
+ end
22
+
23
+ # Victoria Day
24
+ [Date.civil(2004,5,24), Date.civil(2005,5,23), Date.civil(2006,5,22),
25
+ Date.civil(2007,5,21), Date.civil(2008,5,19)].each do |date|
26
+ assert_equal 'Victoria Day', Holidays.on(date, :ca)[0][:name]
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,49 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/de'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: data/de.yaml
7
+ class DeDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_de
10
+ {Date.civil(2009,1,1) => 'Neujahrstag',
11
+ Date.civil(2009,4,10) => 'Karfreitag',
12
+ Date.civil(2009,4,13) => 'Ostermontag',
13
+ Date.civil(2009,5,1) => 'Tag der Arbeit',
14
+ Date.civil(2009,5,21) => 'Christi Himmelfahrt',
15
+ Date.civil(2009,6,1) => 'Pfingstmontag',
16
+ Date.civil(2009,10,3) => 'Tag der Deutschen Einheit',
17
+ Date.civil(2009,12,25) => '1. Weihnachtstag',
18
+ Date.civil(2009,12,26) => '2. Weihnachtstag'}.each do |date, name|
19
+ assert_equal name, Holidays.on(date, :de, :informal)[0][:name]
20
+ end
21
+
22
+ [:de_bw, :de_by, :de_st, :de_].each do |r|
23
+ assert_equal 'Heilige Drei Könige', Date.civil(2009,1,6).holidays(r)[0][:name]
24
+ end
25
+
26
+ [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_].each do |r|
27
+ assert_equal 'Fronleichnam', Date.civil(2009,6,11).holidays(r)[0][:name]
28
+ end
29
+
30
+ [:de_by, :de_sl, :de_].each do |r|
31
+ assert_equal 'Mariä Himmelfahrt', Date.civil(2009,8,15).holidays(r)[0][:name]
32
+ end
33
+
34
+ [:de_bb, :de_mv, :de_sn, :de_st, :de_th, :de_].each do |r|
35
+ assert_equal 'Reformationstag', Date.civil(2009,10,31).holidays(r)[0][:name]
36
+ end
37
+
38
+ [:de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_].each do |r|
39
+ assert_equal 'Allerheiligen', Date.civil(2009,11,1).holidays(r)[0][:name]
40
+ end
41
+
42
+ # Repentance Day
43
+ assert_equal 'Buß- und Bettag', Date.civil(2004,11,17).holidays(:de_sn)[0][:name]
44
+ assert_equal 'Buß- und Bettag', Date.civil(2005,11,16).holidays(:de_sn)[0][:name]
45
+ assert_equal 'Buß- und Bettag', Date.civil(2006,11,22).holidays(:de_sn)[0][:name]
46
+ assert_equal 'Buß- und Bettag', Date.civil(2009,11,18).holidays(:de_sn)[0][:name]
47
+
48
+ end
49
+ end
@@ -0,0 +1,30 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/dk'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: data/dk.yaml
7
+ class DkDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_dk
10
+ {Date.civil(2007,1,1) => 'Nytårsdag',
11
+ Date.civil(2007,2,18) => 'Fastelavn',
12
+ Date.civil(2007,4,9) => 'Danmarks besættelse',
13
+ Date.civil(2007,4,16) => 'Dronningens fødselsdag',
14
+ Date.civil(2007,4,5) => 'Skærtorsdag',
15
+ Date.civil(2007,4,6) => 'Langfredag',
16
+ Date.civil(2007,4,8) => 'Påskedag',
17
+ Date.civil(2007,4,9) => '2. påskedag',
18
+ Date.civil(2007,5,1) => 'Arbejdernes kampdag',
19
+ Date.civil(2007,5,4) => 'Store Bededag',
20
+ Date.civil(2007,5,17) => 'Kristi Himmelfartsdag',
21
+ Date.civil(2007,5,27) => 'Pinsedag',
22
+ Date.civil(2007,5,28) => '2. Pinsedag',
23
+ Date.civil(2007,6,5) => 'Grundlovsdag',
24
+ Date.civil(2007,12,24) => 'Juleaftensdag',
25
+ Date.civil(2007,12,25) => '1. juledag',
26
+ Date.civil(2007,12,26) => '2. juledag'}.each do |date, name|
27
+ assert_equal name, Holidays.on(date, :dk, :informal)[0][:name]
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,57 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/es'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: data/es.yaml
7
+ class EsDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_es
10
+ {Date.civil(2009,1,1) => 'Año Nuevo',
11
+ Date.civil(2009,1,6) => 'Día de Reyes',
12
+ Date.civil(2009,4,10) => 'Viernes Santo',
13
+ Date.civil(2009,5,1) => 'Día del Trabajador',
14
+ Date.civil(2009,8,15) => 'Asunción',
15
+ Date.civil(2009,10,12) => 'Día de la Hispanidad',
16
+ Date.civil(2009,11,1) => 'Todos los Santos',
17
+ Date.civil(2009,12,6) => 'Día de la Constitución',
18
+ Date.civil(2009,12,8) => 'Inmaculada Concepción',
19
+ Date.civil(2009,12,25) => 'Navidad del Señor'}.each do |date, name|
20
+ assert_equal name, Holidays.on(date, :es, :informal)[0][:name]
21
+ end
22
+
23
+ [:es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_].each do |r|
24
+ assert_equal 'Jueves Santo', Date.civil(2009,4,9).holidays(r)[0][:name]
25
+ assert_equal 'Lunes de Pascua', Date.civil(2009,4,13).holidays(r)[0][:name]
26
+ end
27
+
28
+ [:es_v, :es_vc, :es_cm, :es_mu, :es_m, :es_].each do |r|
29
+ assert_equal 'San José', Date.civil(2009,3,19).holidays(r)[0][:name]
30
+ end
31
+
32
+ [:es_ar, :es_cl, :es_].each do |r|
33
+ assert_equal 'San Jorge', Date.civil(2009,4,23).holidays(r)[0][:name]
34
+ end
35
+
36
+ [:es_vc, :es_v, :es_].each do |r|
37
+ assert_equal 'Día de Valencia', Date.civil(2009,10,9).holidays(r)[0][:name]
38
+ end
39
+
40
+ [:es_ib, :es_ct, :es_].each do |r|
41
+ assert_equal 'San Esteban', Date.civil(2009,12,26).holidays(r)[0][:name]
42
+ end
43
+
44
+ assert_equal 'Día de Andalucía', Date.civil(2009,2,28).holidays(:es_an)[0][:name]
45
+ assert_equal 'Día de las Islas Baleares', Date.civil(2009,3,1).holidays(:es_ib)[0][:name]
46
+ assert_equal 'Fiesta de la Comunidad', Date.civil(2006,5,2).holidays(:es_m)[0][:name]
47
+ assert_equal 'Día de las Canarias', Date.civil(2006,5,30).holidays(:es_cn)[0][:name]
48
+ assert_equal 'Día de la Región Castilla-La Mancha', Date.civil(2009,5,31).holidays(:es_cm)[0][:name]
49
+ assert_equal 'Día de la Región de Murcia', Date.civil(2009,6,9).holidays(:es_mu)[0][:name]
50
+ assert_equal 'Día de La Rioja', Date.civil(2009,6,9).holidays(:es_lo)[0][:name]
51
+ assert_equal 'Santiago Apostol', Date.civil(2009,7,23).holidays(:es_ga)[0][:name]
52
+ assert_equal 'Día de Ceuta', Date.civil(2009,9,2).holidays(:es_ce)[0][:name]
53
+ assert_equal 'Día de Asturias', Date.civil(2009,9,8).holidays(:es_o)[0][:name]
54
+ assert_equal 'Día de Extremadura', Date.civil(2009,9,8).holidays(:es_ex)[0][:name]
55
+ assert_equal 'Fiesta Nacional de Cataluña', Date.civil(2009,9,11).holidays(:es_ct)[0][:name]
56
+ end
57
+ end
@@ -0,0 +1,243 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require 'holidays/europe'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # 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
7
+ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_europe
10
+ {Date.civil(2007,1,1) => 'Nytårsdag',
11
+ Date.civil(2007,2,18) => 'Fastelavn',
12
+ Date.civil(2007,4,9) => 'Danmarks besættelse',
13
+ Date.civil(2007,4,16) => 'Dronningens fødselsdag',
14
+ Date.civil(2007,4,5) => 'Skærtorsdag',
15
+ Date.civil(2007,4,6) => 'Langfredag',
16
+ Date.civil(2007,4,8) => 'Påskedag',
17
+ Date.civil(2007,4,9) => '2. påskedag',
18
+ Date.civil(2007,5,1) => 'Arbejdernes kampdag',
19
+ Date.civil(2007,5,4) => 'Store Bededag',
20
+ Date.civil(2007,5,17) => 'Kristi Himmelfartsdag',
21
+ Date.civil(2007,5,27) => 'Pinsedag',
22
+ Date.civil(2007,5,28) => '2. Pinsedag',
23
+ Date.civil(2007,6,5) => 'Grundlovsdag',
24
+ Date.civil(2007,12,24) => 'Juleaftensdag',
25
+ Date.civil(2007,12,25) => '1. juledag',
26
+ Date.civil(2007,12,26) => '2. juledag'}.each do |date, name|
27
+ assert_equal name, Holidays.on(date, :dk, :informal)[0][:name]
28
+ end
29
+
30
+ {Date.civil(2009,1,1) => 'Neujahrstag',
31
+ Date.civil(2009,4,10) => 'Karfreitag',
32
+ Date.civil(2009,4,13) => 'Ostermontag',
33
+ Date.civil(2009,5,1) => 'Tag der Arbeit',
34
+ Date.civil(2009,5,21) => 'Christi Himmelfahrt',
35
+ Date.civil(2009,6,1) => 'Pfingstmontag',
36
+ Date.civil(2009,10,3) => 'Tag der Deutschen Einheit',
37
+ Date.civil(2009,12,25) => '1. Weihnachtstag',
38
+ Date.civil(2009,12,26) => '2. Weihnachtstag'}.each do |date, name|
39
+ assert_equal name, Holidays.on(date, :de, :informal)[0][:name]
40
+ end
41
+
42
+ [:de_bw, :de_by, :de_st, :de_].each do |r|
43
+ assert_equal 'Heilige Drei Könige', Date.civil(2009,1,6).holidays(r)[0][:name]
44
+ end
45
+
46
+ [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_].each do |r|
47
+ assert_equal 'Fronleichnam', Date.civil(2009,6,11).holidays(r)[0][:name]
48
+ end
49
+
50
+ [:de_by, :de_sl, :de_].each do |r|
51
+ assert_equal 'Mariä Himmelfahrt', Date.civil(2009,8,15).holidays(r)[0][:name]
52
+ end
53
+
54
+ [:de_bb, :de_mv, :de_sn, :de_st, :de_th, :de_].each do |r|
55
+ assert_equal 'Reformationstag', Date.civil(2009,10,31).holidays(r)[0][:name]
56
+ end
57
+
58
+ [:de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_].each do |r|
59
+ assert_equal 'Allerheiligen', Date.civil(2009,11,1).holidays(r)[0][:name]
60
+ end
61
+
62
+ # Repentance Day
63
+ assert_equal 'Buß- und Bettag', Date.civil(2004,11,17).holidays(:de_sn)[0][:name]
64
+ assert_equal 'Buß- und Bettag', Date.civil(2005,11,16).holidays(:de_sn)[0][:name]
65
+ assert_equal 'Buß- und Bettag', Date.civil(2006,11,22).holidays(:de_sn)[0][:name]
66
+ assert_equal 'Buß- und Bettag', Date.civil(2009,11,18).holidays(:de_sn)[0][:name]
67
+
68
+
69
+ {Date.civil(2009,1,1) => 'Año Nuevo',
70
+ Date.civil(2009,1,6) => 'Día de Reyes',
71
+ Date.civil(2009,4,10) => 'Viernes Santo',
72
+ Date.civil(2009,5,1) => 'Día del Trabajador',
73
+ Date.civil(2009,8,15) => 'Asunción',
74
+ Date.civil(2009,10,12) => 'Día de la Hispanidad',
75
+ Date.civil(2009,11,1) => 'Todos los Santos',
76
+ Date.civil(2009,12,6) => 'Día de la Constitución',
77
+ Date.civil(2009,12,8) => 'Inmaculada Concepción',
78
+ Date.civil(2009,12,25) => 'Navidad del Señor'}.each do |date, name|
79
+ assert_equal name, Holidays.on(date, :es, :informal)[0][:name]
80
+ end
81
+
82
+ [:es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_].each do |r|
83
+ assert_equal 'Jueves Santo', Date.civil(2009,4,9).holidays(r)[0][:name]
84
+ assert_equal 'Lunes de Pascua', Date.civil(2009,4,13).holidays(r)[0][:name]
85
+ end
86
+
87
+ [:es_v, :es_vc, :es_cm, :es_mu, :es_m, :es_].each do |r|
88
+ assert_equal 'San José', Date.civil(2009,3,19).holidays(r)[0][:name]
89
+ end
90
+
91
+ [:es_ar, :es_cl, :es_].each do |r|
92
+ assert_equal 'San Jorge', Date.civil(2009,4,23).holidays(r)[0][:name]
93
+ end
94
+
95
+ [:es_vc, :es_v, :es_].each do |r|
96
+ assert_equal 'Día de Valencia', Date.civil(2009,10,9).holidays(r)[0][:name]
97
+ end
98
+
99
+ [:es_ib, :es_ct, :es_].each do |r|
100
+ assert_equal 'San Esteban', Date.civil(2009,12,26).holidays(r)[0][:name]
101
+ end
102
+
103
+ assert_equal 'Día de Andalucía', Date.civil(2009,2,28).holidays(:es_an)[0][:name]
104
+ assert_equal 'Día de las Islas Baleares', Date.civil(2009,3,1).holidays(:es_ib)[0][:name]
105
+ assert_equal 'Fiesta de la Comunidad', Date.civil(2006,5,2).holidays(:es_m)[0][:name]
106
+ assert_equal 'Día de las Canarias', Date.civil(2006,5,30).holidays(:es_cn)[0][:name]
107
+ assert_equal 'Día de la Región Castilla-La Mancha', Date.civil(2009,5,31).holidays(:es_cm)[0][:name]
108
+ assert_equal 'Día de la Región de Murcia', Date.civil(2009,6,9).holidays(:es_mu)[0][:name]
109
+ assert_equal 'Día de La Rioja', Date.civil(2009,6,9).holidays(:es_lo)[0][:name]
110
+ assert_equal 'Santiago Apostol', Date.civil(2009,7,23).holidays(:es_ga)[0][:name]
111
+ assert_equal 'Día de Ceuta', Date.civil(2009,9,2).holidays(:es_ce)[0][:name]
112
+ assert_equal 'Día de Asturias', Date.civil(2009,9,8).holidays(:es_o)[0][:name]
113
+ assert_equal 'Día de Extremadura', Date.civil(2009,9,8).holidays(:es_ex)[0][:name]
114
+ assert_equal 'Fiesta Nacional de Cataluña', Date.civil(2009,9,11).holidays(:es_ct)[0][:name]
115
+
116
+ {Date.civil(2007,1,1) => 'Jour de l\'an',
117
+ Date.civil(2007,4,8) => 'Pâques',
118
+ Date.civil(2007,4,9) => 'Lundi de Pâques',
119
+ Date.civil(2007,5,1) => 'Fête du travail',
120
+ Date.civil(2007,5,8) => 'Victoire 1945',
121
+ Date.civil(2007,5,17) => 'Ascension',
122
+ Date.civil(2007,5,27) => 'Pentecôte',
123
+ Date.civil(2007,5,28) => 'Lundi de Pentecôte',
124
+ Date.civil(2007,7,14) => 'Fête nationale',
125
+ Date.civil(2007,8,15) => 'Assomption',
126
+ Date.civil(2007,11,1) => 'Toussaint',
127
+ Date.civil(2007,11,11) => 'Armistice 1918',
128
+ Date.civil(2007,12,25) => 'Nöel'}.each do |date, name|
129
+ assert_equal name, Holidays.on(date, :fr, :informal)[0][:name]
130
+ end
131
+
132
+ {Date.civil(2008,1,1) => 'New Year\'s Day',
133
+ Date.civil(2008,3,21) => 'Good Friday',
134
+ Date.civil(2008,3,23) => 'Easter Sunday',
135
+ Date.civil(2008,5,5) => 'May Day',
136
+ Date.civil(2008,5,26) => 'Bank Holiday',
137
+ Date.civil(2008,11,5) => 'Guy Fawkes Day',
138
+ Date.civil(2008,12,25) => 'Christmas Day',
139
+ Date.civil(2008,12,26) => 'Boxing Day'}.each do |date, name|
140
+ assert_equal name, Holidays.on(date, :gb, :informal)[0][:name]
141
+ end
142
+
143
+ assert_equal 'St. Patrick\'s Day', Date.civil(2008,3,17).holidays(:gb_nir, :informal)[0][:name]
144
+
145
+ assert_equal 'Christmas Day', Date.civil(2008,12,25).holidays(:gb_, :observed)[0][:name]
146
+ assert_equal 'Christmas Day', Date.civil(2009,12,25).holidays(:gb_, :observed)[0][:name]
147
+ assert_equal 'Christmas Day', Date.civil(2010,12,27).holidays(:gb_, :observed)[0][:name]
148
+
149
+ assert_equal 'Boxing Day', Date.civil(2008,12,26).holidays(:gb_, :observed)[0][:name]
150
+ assert_equal 'Boxing Day', Date.civil(2009,12,28).holidays(:gb_, :observed)[0][:name]
151
+ assert_equal 'Boxing Day', Date.civil(2010,12,28).holidays(:gb_, :observed)[0][:name]
152
+
153
+ [:gb_wls, :gb_eng, :gb_nir, :gb_eaw, :gb_].each do |r|
154
+ assert_equal 'Easter Monday', Date.civil(2008,3,24).holidays(r)[0][:name]
155
+ assert_equal 'Bank Holiday', Date.civil(2008,8,25).holidays(r)[0][:name]
156
+ end
157
+
158
+ {Date.civil(2008,1,1) => 'New Year\'s Day',
159
+ Date.civil(2008,3,17) => 'St. Patrick\'s Day',
160
+ Date.civil(2008,3,24) => 'Easter Monday',
161
+ Date.civil(2008,5,5) => 'May Day',
162
+ Date.civil(2008,6,2) => 'Bank Holiday',
163
+ Date.civil(2008,8,4) => 'Bank Holiday',
164
+ Date.civil(2008,12,25) => 'Christmas Day',
165
+ Date.civil(2008,12,26) => 'St. Stephen\'s Day'}.each do |date, name|
166
+ assert_equal name, Holidays.on(date, :ie, :informal)[0][:name]
167
+ end
168
+
169
+ {Date.civil(2007,1,1) => 'Nýársdagur',
170
+ Date.civil(2007,1,6) => 'Þrettándinn',
171
+ Date.civil(2007,1,19) => 'Bóndadagur',
172
+ Date.civil(2007,2,18) => 'Konudagur',
173
+ Date.civil(2007,4,5) => 'Skírdagur',
174
+ Date.civil(2007,4,6) => 'Föstudaginn langi',
175
+ Date.civil(2007,4,8) => 'Páskadagur',
176
+ Date.civil(2007,4,9) => 'Annar í páskum',
177
+ Date.civil(2007,4,19) => 'Sumardagurinn fyrsti',
178
+ Date.civil(2007,5,1) => 'Verkalýðsdagurinn',
179
+ Date.civil(2007,5,17) => 'Uppstigningardagur',
180
+ Date.civil(2007,5,27) => 'Hvítasunnudagur',
181
+ Date.civil(2007,5,28) => 'Annar í hvítasunnu',
182
+ Date.civil(2007,6,3) => 'Sjómannadagurinn',
183
+ Date.civil(2007,6,17) => 'Lýðveldisdagurinn',
184
+ Date.civil(2007,8,6) => 'Frídagur verslunarmanna',
185
+ Date.civil(2007,12,24) => 'Jól',
186
+ Date.civil(2007,12,25) => 'Jól',
187
+ Date.civil(2007,12,26) => 'Jól',
188
+ Date.civil(2007,12,31) => 'Gamlárskvöld'}.each do |date, name|
189
+ assert_equal name, Holidays.on(date, :is, :informal)[0][:name]
190
+ end
191
+
192
+ {Date.civil(2007,1,1) => 'Capodanno',
193
+ Date.civil(2007,1,6) => 'Epifania',
194
+ Date.civil(2007,4,8) => 'Pasqua',
195
+ Date.civil(2007,4,9) => 'Lunedì dell\'Angelo',
196
+ Date.civil(2007,4,25) => 'Festa della Liberazione',
197
+ Date.civil(2007,5,1) => 'Festa dei Lavoratori',
198
+ Date.civil(2007,6,2) => 'Festa della Repubblica',
199
+ Date.civil(2007,8,15) => 'Assunzione',
200
+ Date.civil(2007,11,1) => 'Ognissanti',
201
+ Date.civil(2007,12,8) => 'Immacolata Concezione',
202
+ Date.civil(2007,12,25) => 'Natale',
203
+ Date.civil(2007,12,26) => 'Santo Stefano'}.each do |date, name|
204
+ assert_equal name, Holidays.on(date, :it, :informal)[0][:name]
205
+ end
206
+
207
+ {Date.civil(2008,1,1) => 'Nieuwjaar',
208
+ Date.civil(2008,3,21) => 'Goede Vrijdag',
209
+ Date.civil(2008,3,23) => 'Pasen',
210
+ Date.civil(2008,3,24) => 'Pasen',
211
+ Date.civil(2008,4,30) => 'Koninginnedag',
212
+ Date.civil(2008,5,1) => 'Hemelvaartsdag', # Ascension, Easter+39
213
+ Date.civil(2008,5,5) => 'Bevrijdingsdag',
214
+ Date.civil(2008,5,11) => 'Pinksteren', # Pentecost, Easter+49
215
+ Date.civil(2008,5,12) => 'Pinksteren', # Pentecost, Easter+50
216
+ Date.civil(2008,12,25) => 'Kerstmis',
217
+ Date.civil(2008,12,26) => 'Kerstmis'}.each do |date, name|
218
+ assert_equal name, Holidays.on(date, :nl, :informal)[0][:name]
219
+ end
220
+
221
+ {Date.civil(2008,1,1) => 'Ano Novo',
222
+ Date.civil(2005,2,8) => 'Carnaval',
223
+ Date.civil(2006,2,28) => 'Carnaval',
224
+ Date.civil(2007,2,20) => 'Carnaval',
225
+ Date.civil(2008,2,5) => 'Carnaval',
226
+ Date.civil(2008,3,21) => 'Sexta-feira Santa',
227
+ Date.civil(2008,3,23) => 'Páscoa',
228
+ Date.civil(2008,4,25) => 'Dia da Liberdade',
229
+ Date.civil(2008,5,1) => 'Dia do Trabalhador',
230
+ Date.civil(2005,5,26) => 'Corpo de Deus',
231
+ Date.civil(2007,6,7) => 'Corpo de Deus',
232
+ Date.civil(2008,5,22) => 'Corpo de Deus',
233
+ Date.civil(2008,6,10) => 'Dia de Portugal',
234
+ Date.civil(2008,8,15) => 'Assunção de Nossa Senhora',
235
+ Date.civil(2008,10,5) => 'Implantação da República',
236
+ Date.civil(2008,11,1) => 'Todos os Santos',
237
+ Date.civil(2008,12,1) => 'Restauração da Independência',
238
+ Date.civil(2008,12,8) => 'Imaculada Conceição',
239
+ Date.civil(2008,12,25) => 'Natal'}.each do |date, name|
240
+ assert_equal name, Holidays.on(date, :pt, :informal)[0][:name]
241
+ end
242
+ end
243
+ end