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,26 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/fr'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/fr.yaml
|
7
|
+
class FrDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_fr
|
10
|
+
{Date.civil(2007,1,1) => 'Jour de l\'an',
|
11
|
+
Date.civil(2007,4,8) => 'Pâques',
|
12
|
+
Date.civil(2007,4,9) => 'Lundi de Pâques',
|
13
|
+
Date.civil(2007,5,1) => 'Fête du travail',
|
14
|
+
Date.civil(2007,5,8) => 'Victoire 1945',
|
15
|
+
Date.civil(2007,5,17) => 'Ascension',
|
16
|
+
Date.civil(2007,5,27) => 'Pentecôte',
|
17
|
+
Date.civil(2007,5,28) => 'Lundi de Pentecôte',
|
18
|
+
Date.civil(2007,7,14) => 'Fête nationale',
|
19
|
+
Date.civil(2007,8,15) => 'Assomption',
|
20
|
+
Date.civil(2007,11,1) => 'Toussaint',
|
21
|
+
Date.civil(2007,11,11) => 'Armistice 1918',
|
22
|
+
Date.civil(2007,12,25) => 'Nöel'}.each do |date, name|
|
23
|
+
assert_equal name, Holidays.on(date, :fr, :informal)[0][:name]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/gb'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/gb.yaml
|
7
|
+
class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_gb
|
10
|
+
{Date.civil(2008,1,1) => 'New Year\'s Day',
|
11
|
+
Date.civil(2008,3,21) => 'Good Friday',
|
12
|
+
Date.civil(2008,3,23) => 'Easter Sunday',
|
13
|
+
Date.civil(2008,5,5) => 'May Day',
|
14
|
+
Date.civil(2008,5,26) => 'Bank Holiday',
|
15
|
+
Date.civil(2008,11,5) => 'Guy Fawkes Day',
|
16
|
+
Date.civil(2008,12,25) => 'Christmas Day',
|
17
|
+
Date.civil(2008,12,26) => 'Boxing Day'}.each do |date, name|
|
18
|
+
assert_equal name, Holidays.on(date, :gb, :informal)[0][:name]
|
19
|
+
end
|
20
|
+
|
21
|
+
assert_equal 'St. Patrick\'s Day', Date.civil(2008,3,17).holidays(:gb_nir, :informal)[0][:name]
|
22
|
+
|
23
|
+
assert_equal 'Christmas Day', Date.civil(2008,12,25).holidays(:gb_, :observed)[0][:name]
|
24
|
+
assert_equal 'Christmas Day', Date.civil(2009,12,25).holidays(:gb_, :observed)[0][:name]
|
25
|
+
assert_equal 'Christmas Day', Date.civil(2010,12,27).holidays(:gb_, :observed)[0][:name]
|
26
|
+
|
27
|
+
assert_equal 'Boxing Day', Date.civil(2008,12,26).holidays(:gb_, :observed)[0][:name]
|
28
|
+
assert_equal 'Boxing Day', Date.civil(2009,12,28).holidays(:gb_, :observed)[0][:name]
|
29
|
+
assert_equal 'Boxing Day', Date.civil(2010,12,28).holidays(:gb_, :observed)[0][:name]
|
30
|
+
|
31
|
+
[:gb_wls, :gb_eng, :gb_nir, :gb_eaw, :gb_].each do |r|
|
32
|
+
assert_equal 'Easter Monday', Date.civil(2008,3,24).holidays(r)[0][:name]
|
33
|
+
assert_equal 'Bank Holiday', Date.civil(2008,8,25).holidays(r)[0][:name]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/ie'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/ie.yaml
|
7
|
+
class IeDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_ie
|
10
|
+
{Date.civil(2008,1,1) => 'New Year\'s Day',
|
11
|
+
Date.civil(2008,3,17) => 'St. Patrick\'s Day',
|
12
|
+
Date.civil(2008,3,24) => 'Easter Monday',
|
13
|
+
Date.civil(2008,5,5) => 'May Day',
|
14
|
+
Date.civil(2008,6,2) => 'Bank Holiday',
|
15
|
+
Date.civil(2008,8,4) => 'Bank Holiday',
|
16
|
+
Date.civil(2008,12,25) => 'Christmas Day',
|
17
|
+
Date.civil(2008,12,26) => 'St. Stephen\'s Day'}.each do |date, name|
|
18
|
+
assert_equal name, Holidays.on(date, :ie, :informal)[0][:name]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/is'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/is.yaml
|
7
|
+
class IsDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_is
|
10
|
+
{Date.civil(2007,1,1) => 'Nýársdagur',
|
11
|
+
Date.civil(2007,1,6) => 'Þrettándinn',
|
12
|
+
Date.civil(2007,1,19) => 'Bóndadagur',
|
13
|
+
Date.civil(2007,2,18) => 'Konudagur',
|
14
|
+
Date.civil(2007,4,5) => 'Skírdagur',
|
15
|
+
Date.civil(2007,4,6) => 'Föstudaginn langi',
|
16
|
+
Date.civil(2007,4,8) => 'Páskadagur',
|
17
|
+
Date.civil(2007,4,9) => 'Annar í páskum',
|
18
|
+
Date.civil(2007,4,19) => 'Sumardagurinn fyrsti',
|
19
|
+
Date.civil(2007,5,1) => 'Verkalýðsdagurinn',
|
20
|
+
Date.civil(2007,5,17) => 'Uppstigningardagur',
|
21
|
+
Date.civil(2007,5,27) => 'Hvítasunnudagur',
|
22
|
+
Date.civil(2007,5,28) => 'Annar í hvítasunnu',
|
23
|
+
Date.civil(2007,6,3) => 'Sjómannadagurinn',
|
24
|
+
Date.civil(2007,6,17) => 'Lýðveldisdagurinn',
|
25
|
+
Date.civil(2007,8,6) => 'Frídagur verslunarmanna',
|
26
|
+
Date.civil(2007,12,24) => 'Jól',
|
27
|
+
Date.civil(2007,12,25) => 'Jól',
|
28
|
+
Date.civil(2007,12,26) => 'Jól',
|
29
|
+
Date.civil(2007,12,31) => 'Gamlárskvöld'}.each do |date, name|
|
30
|
+
assert_equal name, Holidays.on(date, :is, :informal)[0][:name]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/it'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/it.yaml
|
7
|
+
class ItDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_it
|
10
|
+
{Date.civil(2007,1,1) => 'Capodanno',
|
11
|
+
Date.civil(2007,1,6) => 'Epifania',
|
12
|
+
Date.civil(2007,4,8) => 'Pasqua',
|
13
|
+
Date.civil(2007,4,9) => 'Lunedì dell\'Angelo',
|
14
|
+
Date.civil(2007,4,25) => 'Festa della Liberazione',
|
15
|
+
Date.civil(2007,5,1) => 'Festa dei Lavoratori',
|
16
|
+
Date.civil(2007,6,2) => 'Festa della Repubblica',
|
17
|
+
Date.civil(2007,8,15) => 'Assunzione',
|
18
|
+
Date.civil(2007,11,1) => 'Ognissanti',
|
19
|
+
Date.civil(2007,12,8) => 'Immacolata Concezione',
|
20
|
+
Date.civil(2007,12,25) => 'Natale',
|
21
|
+
Date.civil(2007,12,26) => 'Santo Stefano'}.each do |date, name|
|
22
|
+
assert_equal name, Holidays.on(date, :it, :informal)[0][:name]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/mx'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/mx.yaml, data/north_america_informal.yaml
|
7
|
+
class MxDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_mx
|
10
|
+
{Date.civil(2007,1,1) => 'Año nuevo',
|
11
|
+
Date.civil(2007,2,5) => 'Día de la Constitución',
|
12
|
+
Date.civil(2007,5,1) => 'Día del Trabajo',
|
13
|
+
Date.civil(2007,5,5) => 'Cinco de Mayo',
|
14
|
+
Date.civil(2007,9,16) => 'Día de la Independencia',
|
15
|
+
Date.civil(2007,11,1) => 'Todos los Santos',
|
16
|
+
Date.civil(2007,11,2) => 'Los Fieles Difuntos',
|
17
|
+
Date.civil(2007,11,19) => 'Día de la Revolución',
|
18
|
+
Date.civil(2007,12,25) => 'Navidad'}.each do |date, name|
|
19
|
+
assert_equal name, Holidays.on(date, :mx, :informal)[0][:name]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/nl'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/nl.yaml
|
7
|
+
class NlDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_nl
|
10
|
+
{Date.civil(2008,1,1) => 'Nieuwjaar',
|
11
|
+
Date.civil(2008,3,21) => 'Goede Vrijdag',
|
12
|
+
Date.civil(2008,3,23) => 'Pasen',
|
13
|
+
Date.civil(2008,3,24) => 'Pasen',
|
14
|
+
Date.civil(2008,4,30) => 'Koninginnedag',
|
15
|
+
Date.civil(2008,5,1) => 'Hemelvaartsdag', # Ascension, Easter+39
|
16
|
+
Date.civil(2008,5,5) => 'Bevrijdingsdag',
|
17
|
+
Date.civil(2008,5,11) => 'Pinksteren', # Pentecost, Easter+49
|
18
|
+
Date.civil(2008,5,12) => 'Pinksteren', # Pentecost, Easter+50
|
19
|
+
Date.civil(2008,12,25) => 'Kerstmis',
|
20
|
+
Date.civil(2008,12,26) => 'Kerstmis'}.each do |date, name|
|
21
|
+
assert_equal name, Holidays.on(date, :nl, :informal)[0][:name]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/north_america'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/ca.yaml, data/mx.yaml, data/us.yaml, data/north_america_informal.yaml
|
7
|
+
class North_americaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_north_america
|
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
|
+
|
29
|
+
{Date.civil(2007,1,1) => 'Año nuevo',
|
30
|
+
Date.civil(2007,2,5) => 'Día de la Constitución',
|
31
|
+
Date.civil(2007,5,1) => 'Día del Trabajo',
|
32
|
+
Date.civil(2007,5,5) => 'Cinco de Mayo',
|
33
|
+
Date.civil(2007,9,16) => 'Día de la Independencia',
|
34
|
+
Date.civil(2007,11,1) => 'Todos los Santos',
|
35
|
+
Date.civil(2007,11,2) => 'Los Fieles Difuntos',
|
36
|
+
Date.civil(2007,11,19) => 'Día de la Revolución',
|
37
|
+
Date.civil(2007,12,25) => 'Navidad'}.each do |date, name|
|
38
|
+
assert_equal name, Holidays.on(date, :mx, :informal)[0][:name]
|
39
|
+
end
|
40
|
+
|
41
|
+
{Date.civil(2008,1,1) => 'New Year\'s Day',
|
42
|
+
Date.civil(2008,1,21) => 'Martin Luther King, Jr. Day',
|
43
|
+
Date.civil(2008,2,18) => 'Presidents\' Day',
|
44
|
+
Date.civil(2008,5,26) => 'Memorial Day',
|
45
|
+
Date.civil(2008,7,4) => 'Independence Day',
|
46
|
+
Date.civil(2008,9,1) => 'Labor Day',
|
47
|
+
Date.civil(2008,10,13) => 'Columbus Day',
|
48
|
+
Date.civil(2008,11,11) => 'Veterans Day',
|
49
|
+
Date.civil(2008,11,27) => 'Thanksgiving',
|
50
|
+
Date.civil(2008,12,25) => 'Christmas Day'}.each do |date, name|
|
51
|
+
assert_equal name, Holidays.on(date, :us)[0][:name]
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/nyse'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/nyse.yaml
|
7
|
+
class NyseDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_nyse
|
10
|
+
{Date.civil(2008,1,1) => 'New Year\'s Day',
|
11
|
+
Date.civil(2008,1,21) => 'Martin Luther King, Jr. Day',
|
12
|
+
Date.civil(2008,2,18) => 'Presidents\' Day',
|
13
|
+
Date.civil(2008,3,21) => 'Good Friday',
|
14
|
+
Date.civil(2008,5,26) => 'Memorial Day',
|
15
|
+
Date.civil(2008,7,4) => 'Independence Day',
|
16
|
+
Date.civil(2008,9,1) => 'Labor Day',
|
17
|
+
Date.civil(2008,11,27) => 'Thanksgiving',
|
18
|
+
Date.civil(2008,12,25) => 'Christmas Day'}.each do |date, name|
|
19
|
+
assert_equal name, Holidays.on(date, :nyse)[0][:name]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/pt'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/pt.yaml
|
7
|
+
class PtDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_pt
|
10
|
+
{Date.civil(2008,1,1) => 'Ano Novo',
|
11
|
+
Date.civil(2005,2,8) => 'Carnaval',
|
12
|
+
Date.civil(2006,2,28) => 'Carnaval',
|
13
|
+
Date.civil(2007,2,20) => 'Carnaval',
|
14
|
+
Date.civil(2008,2,5) => 'Carnaval',
|
15
|
+
Date.civil(2008,3,21) => 'Sexta-feira Santa',
|
16
|
+
Date.civil(2008,3,23) => 'Páscoa',
|
17
|
+
Date.civil(2008,4,25) => 'Dia da Liberdade',
|
18
|
+
Date.civil(2008,5,1) => 'Dia do Trabalhador',
|
19
|
+
Date.civil(2005,5,26) => 'Corpo de Deus',
|
20
|
+
Date.civil(2007,6,7) => 'Corpo de Deus',
|
21
|
+
Date.civil(2008,5,22) => 'Corpo de Deus',
|
22
|
+
Date.civil(2008,6,10) => 'Dia de Portugal',
|
23
|
+
Date.civil(2008,8,15) => 'Assunção de Nossa Senhora',
|
24
|
+
Date.civil(2008,10,5) => 'Implantação da República',
|
25
|
+
Date.civil(2008,11,1) => 'Todos os Santos',
|
26
|
+
Date.civil(2008,12,1) => 'Restauração da Independência',
|
27
|
+
Date.civil(2008,12,8) => 'Imaculada Conceição',
|
28
|
+
Date.civil(2008,12,25) => 'Natal'}.each do |date, name|
|
29
|
+
assert_equal name, Holidays.on(date, :pt, :informal)[0][:name]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_pt_br
|
34
|
+
{
|
35
|
+
Date.civil(2008,1,1) => 'Ano Novo',
|
36
|
+
Date.civil(2005,2,8) => 'Carnaval',
|
37
|
+
Date.civil(2006,2,28) => 'Carnaval',
|
38
|
+
Date.civil(2007,2,20) => 'Carnaval',
|
39
|
+
Date.civil(2008,3,21) => 'Sexta-feira Santa',
|
40
|
+
Date.civil(2008,3,23) => 'Páscoa',
|
41
|
+
Date.civil(2005,5,26) => 'Corpo de Deus',
|
42
|
+
Date.civil(2007,6,7) => 'Corpo de Deus',
|
43
|
+
Date.civil(2008,5,22) => 'Corpo de Deus',
|
44
|
+
Date.civil(2008,4,21) => 'Tiradentes',
|
45
|
+
Date.civil(2008,5,1) => 'Dia do Trabalhador',
|
46
|
+
Date.civil(2008,9,7) => 'Independência do Brasil',
|
47
|
+
Date.civil(2008,10,12) => 'Nossa Senhora Aparecida',
|
48
|
+
Date.civil(2008,11,2) => 'Finados',
|
49
|
+
Date.civil(2008,11,15) => 'Proclamação da República',
|
50
|
+
Date.civil(2008,12,25) => 'Natal'
|
51
|
+
}.each do |date, name|
|
52
|
+
assert_equal name, Holidays.on(date, :pt_br, :informal)[0][:name]
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/scandinavia'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/dk.yaml, data/is.yaml, data/se.yaml
|
7
|
+
class ScandinaviaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_scandinavia
|
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(2007,1,1) => 'Nýársdagur',
|
31
|
+
Date.civil(2007,1,6) => 'Þrettándinn',
|
32
|
+
Date.civil(2007,1,19) => 'Bóndadagur',
|
33
|
+
Date.civil(2007,2,18) => 'Konudagur',
|
34
|
+
Date.civil(2007,4,5) => 'Skírdagur',
|
35
|
+
Date.civil(2007,4,6) => 'Föstudaginn langi',
|
36
|
+
Date.civil(2007,4,8) => 'Páskadagur',
|
37
|
+
Date.civil(2007,4,9) => 'Annar í páskum',
|
38
|
+
Date.civil(2007,4,19) => 'Sumardagurinn fyrsti',
|
39
|
+
Date.civil(2007,5,1) => 'Verkalýðsdagurinn',
|
40
|
+
Date.civil(2007,5,17) => 'Uppstigningardagur',
|
41
|
+
Date.civil(2007,5,27) => 'Hvítasunnudagur',
|
42
|
+
Date.civil(2007,5,28) => 'Annar í hvítasunnu',
|
43
|
+
Date.civil(2007,6,3) => 'Sjómannadagurinn',
|
44
|
+
Date.civil(2007,6,17) => 'Lýðveldisdagurinn',
|
45
|
+
Date.civil(2007,8,6) => 'Frídagur verslunarmanna',
|
46
|
+
Date.civil(2007,12,24) => 'Jól',
|
47
|
+
Date.civil(2007,12,25) => 'Jól',
|
48
|
+
Date.civil(2007,12,26) => 'Jól',
|
49
|
+
Date.civil(2007,12,31) => 'Gamlárskvöld'}.each do |date, name|
|
50
|
+
assert_equal name, Holidays.on(date, :is, :informal)[0][:name]
|
51
|
+
end
|
52
|
+
|
53
|
+
{Date.civil(2008,1,1) => 'Nyårsdagen',
|
54
|
+
Date.civil(2008,1,6) => 'Trettondedag jul',
|
55
|
+
Date.civil(2008,3,21) => 'Långfredagen',
|
56
|
+
Date.civil(2008,3,23) => 'Påskdagen',
|
57
|
+
Date.civil(2008,3,24) => 'Annandag påsk',
|
58
|
+
Date.civil(2008,5,1) => 'Första maj',
|
59
|
+
Date.civil(2008,5,1) => 'Kristi himmelsfärdsdag',
|
60
|
+
Date.civil(2008,5,11) => 'Pingstdagen',
|
61
|
+
Date.civil(2008,6,6) => 'Nationaldagen',
|
62
|
+
Date.civil(2005,6,25) => 'Midsommardagen',
|
63
|
+
Date.civil(2006,6,24) => 'Midsommardagen',
|
64
|
+
Date.civil(2007,6,23) => 'Midsommardagen',
|
65
|
+
Date.civil(2008,6,21) => 'Midsommardagen',
|
66
|
+
Date.civil(2005,11,5) => 'Alla helgons dag',
|
67
|
+
Date.civil(2006,11,4) => 'Alla helgons dag',
|
68
|
+
Date.civil(2007,11,3) => 'Alla helgons dag',
|
69
|
+
Date.civil(2008,11,1) => 'Alla helgons dag',
|
70
|
+
Date.civil(2008,12,25) => 'Juldagen',
|
71
|
+
Date.civil(2008,12,26) => 'Annandag jul'}.each do |date, name|
|
72
|
+
assert_equal name, Holidays.on(date, :se, :informal)[0][:name]
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/se'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/se.yaml
|
7
|
+
class SeDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_se
|
10
|
+
{Date.civil(2008,1,1) => 'Nyårsdagen',
|
11
|
+
Date.civil(2008,1,6) => 'Trettondedag jul',
|
12
|
+
Date.civil(2008,3,21) => 'Långfredagen',
|
13
|
+
Date.civil(2008,3,23) => 'Påskdagen',
|
14
|
+
Date.civil(2008,3,24) => 'Annandag påsk',
|
15
|
+
Date.civil(2008,5,1) => 'Första maj',
|
16
|
+
Date.civil(2008,5,1) => 'Kristi himmelsfärdsdag',
|
17
|
+
Date.civil(2008,5,11) => 'Pingstdagen',
|
18
|
+
Date.civil(2008,6,6) => 'Nationaldagen',
|
19
|
+
Date.civil(2005,6,25) => 'Midsommardagen',
|
20
|
+
Date.civil(2006,6,24) => 'Midsommardagen',
|
21
|
+
Date.civil(2007,6,23) => 'Midsommardagen',
|
22
|
+
Date.civil(2008,6,21) => 'Midsommardagen',
|
23
|
+
Date.civil(2005,11,5) => 'Alla helgons dag',
|
24
|
+
Date.civil(2006,11,4) => 'Alla helgons dag',
|
25
|
+
Date.civil(2007,11,3) => 'Alla helgons dag',
|
26
|
+
Date.civil(2008,11,1) => 'Alla helgons dag',
|
27
|
+
Date.civil(2008,12,25) => 'Juldagen',
|
28
|
+
Date.civil(2008,12,26) => 'Annandag jul'}.each do |date, name|
|
29
|
+
assert_equal name, Holidays.on(date, :se, :informal)[0][:name]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|