holidays 4.7.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/CHANGELOG.md +9 -0
- data/CONTRIBUTING.md +21 -11
- data/Makefile +9 -6
- data/holidays.gemspec +1 -1
- data/lib/generated_definitions/MANIFEST +1 -0
- data/lib/generated_definitions/REGIONS.rb +1 -1
- data/lib/generated_definitions/hk.rb +112 -0
- data/lib/generated_definitions/kr.rb +4 -4
- data/lib/holidays/errors.rb +1 -0
- data/lib/holidays/finder/context/parse_options.rb +8 -3
- data/lib/holidays/load_all_definitions.rb +0 -11
- data/lib/holidays/version.rb +1 -1
- data/test/defs/test_defs_hk.rb +38 -0
- data/test/defs/test_defs_jp.rb +1 -0
- data/test/defs/test_defs_kr.rb +1 -1
- data/test/holidays/definition/validator/test_region.rb +4 -0
- data/test/holidays/finder/context/test_parse_options.rb +9 -1
- data/test/integration/test_all_regions.rb +4 -4
- data/test/integration/test_custom_holidays.rb +4 -4
- data/test/integration/test_holidays.rb +6 -6
- metadata +6 -60
- data/definitions/README.md +0 -353
- data/definitions/ar.yaml +0 -93
- data/definitions/at.yaml +0 -72
- data/definitions/au.yaml +0 -378
- data/definitions/be_fr.yaml +0 -69
- data/definitions/be_nl.yaml +0 -69
- data/definitions/bg.yaml +0 -127
- data/definitions/br.yaml +0 -77
- data/definitions/ca.yaml +0 -317
- data/definitions/ch.yaml +0 -193
- data/definitions/cl.yaml +0 -94
- data/definitions/cr.yaml +0 -65
- data/definitions/cz.yaml +0 -73
- data/definitions/de.yaml +0 -209
- data/definitions/dk.yaml +0 -130
- data/definitions/ecb_target.yaml +0 -44
- data/definitions/el.yaml +0 -84
- data/definitions/es.yaml +0 -203
- data/definitions/federal_reserve.yaml +0 -114
- data/definitions/fedex.yaml +0 -62
- data/definitions/fi.yaml +0 -115
- data/definitions/fr.yaml +0 -79
- data/definitions/gb.yaml +0 -151
- data/definitions/hr.yaml +0 -79
- data/definitions/hu.yaml +0 -63
- data/definitions/ie.yaml +0 -89
- data/definitions/index.yaml +0 -61
- data/definitions/is.yaml +0 -146
- data/definitions/it.yaml +0 -67
- data/definitions/jp.yaml +0 -321
- data/definitions/kr.yaml +0 -282
- data/definitions/li.yaml +0 -107
- data/definitions/lt.yaml +0 -89
- data/definitions/lu.yaml +0 -56
- data/definitions/ma.yaml +0 -52
- data/definitions/mx.yaml +0 -106
- data/definitions/my.yaml +0 -51
- data/definitions/nerc.yaml +0 -51
- data/definitions/nl.yaml +0 -73
- data/definitions/no.yaml +0 -90
- data/definitions/north_america_informal.yaml +0 -61
- data/definitions/nyse.yaml +0 -64
- data/definitions/nz.yaml +0 -163
- data/definitions/pe.yaml +0 -119
- data/definitions/ph.yaml +0 -94
- data/definitions/pl.yaml +0 -320
- data/definitions/pt.yaml +0 -89
- data/definitions/ro.yaml +0 -78
- data/definitions/se.yaml +0 -120
- data/definitions/sg.yaml +0 -56
- data/definitions/si.yaml +0 -86
- data/definitions/sk.yaml +0 -80
- data/definitions/united_nations.yaml +0 -189
- data/definitions/ups.yaml +0 -62
- data/definitions/us.yaml +0 -103
- data/definitions/ve.yaml +0 -74
- data/definitions/vi.yaml +0 -29
- data/definitions/za.yaml +0 -80
data/definitions/li.yaml
DELETED
@@ -1,107 +0,0 @@
|
|
1
|
-
# Liechtenstein holiday definitions for the Ruby Holiday gem.
|
2
|
-
#
|
3
|
-
# Updated: 2011-10-17.
|
4
|
-
# Sources:
|
5
|
-
# http://www.tourismus.li/de/navpage-RegionLI-InformationLI-44728.html
|
6
|
-
---
|
7
|
-
months:
|
8
|
-
0:
|
9
|
-
- name: Fasnachtsdienstag
|
10
|
-
regions: [li]
|
11
|
-
function: easter(year)
|
12
|
-
function_modifier: -47
|
13
|
-
- name: Karfreitag
|
14
|
-
regions: [li]
|
15
|
-
function: easter(year)
|
16
|
-
function_modifier: -2
|
17
|
-
- name: Ostern
|
18
|
-
regions: [li]
|
19
|
-
function: easter(year)
|
20
|
-
type: informal
|
21
|
-
- name: Ostermontag
|
22
|
-
regions: [li]
|
23
|
-
function: easter(year)
|
24
|
-
function_modifier: 1
|
25
|
-
- name: Auffahrt
|
26
|
-
regions: [li]
|
27
|
-
function: easter(year)
|
28
|
-
function_modifier: 39
|
29
|
-
- name: Pfingstmontag
|
30
|
-
regions: [li]
|
31
|
-
function: easter(year)
|
32
|
-
function_modifier: 50
|
33
|
-
- name: Fronleichnam
|
34
|
-
regions: [li]
|
35
|
-
function: easter(year)
|
36
|
-
function_modifier: 60
|
37
|
-
1:
|
38
|
-
- name: Neujahrstag
|
39
|
-
regions: [li]
|
40
|
-
mday: 1
|
41
|
-
- name: Heilige Drei Könige
|
42
|
-
regions: [li, li]
|
43
|
-
mday: 6
|
44
|
-
2:
|
45
|
-
- name: Maria Lichtmess
|
46
|
-
regions: [li]
|
47
|
-
mday: 2
|
48
|
-
3:
|
49
|
-
- name: St. Josef
|
50
|
-
regions: [li]
|
51
|
-
mday: 19
|
52
|
-
5:
|
53
|
-
- name: Tag der Arbeit
|
54
|
-
regions: [li]
|
55
|
-
mday: 1
|
56
|
-
8:
|
57
|
-
- name: Staatsfeiertag
|
58
|
-
regions: [li]
|
59
|
-
mday: 15
|
60
|
-
9:
|
61
|
-
- name: Maria Geburt
|
62
|
-
regions: [li]
|
63
|
-
mday: 8
|
64
|
-
11:
|
65
|
-
- name: Allerheiligen
|
66
|
-
regions: [li]
|
67
|
-
mday: 1
|
68
|
-
12:
|
69
|
-
- name: Maria Empfängnis
|
70
|
-
regions: [li]
|
71
|
-
mday: 8
|
72
|
-
- name: Heilig Abend
|
73
|
-
regions: [li]
|
74
|
-
mday: 24
|
75
|
-
- name: Weihnachten
|
76
|
-
regions: [li]
|
77
|
-
mday: 25
|
78
|
-
- name: Stefanstag
|
79
|
-
regions: [li]
|
80
|
-
mday: 26
|
81
|
-
- name: Silvester
|
82
|
-
regions: [li]
|
83
|
-
mday: 31
|
84
|
-
tests: |
|
85
|
-
{Date.civil(2009,1,1) => 'Neujahrstag',
|
86
|
-
Date.civil(2011,3,8) => 'Fasnachtsdienstag',
|
87
|
-
Date.civil(2009,4,10) => 'Karfreitag',
|
88
|
-
Date.civil(2009,4,12) => 'Ostern',
|
89
|
-
Date.civil(2009,4,13) => 'Ostermontag',
|
90
|
-
Date.civil(2009,5,21) => 'Auffahrt',
|
91
|
-
Date.civil(2009,6,1) => 'Pfingstmontag',
|
92
|
-
Date.civil(2009,12,25) => 'Weihnachten',
|
93
|
-
Date.civil(2009,12,26) => 'Stefanstag'}.each do |date, name|
|
94
|
-
assert_equal name, Holidays.on(date, :li, :informal)[0][:name]
|
95
|
-
end
|
96
|
-
|
97
|
-
[:li].each do |r|
|
98
|
-
assert_equal 'Fronleichnam', Holidays.on(Date.civil(2009,6,11), r)[0][:name]
|
99
|
-
end
|
100
|
-
|
101
|
-
[:li].each do |r|
|
102
|
-
assert_equal 'Staatsfeiertag', Holidays.on(Date.civil(2009,8,15), r)[0][:name]
|
103
|
-
end
|
104
|
-
|
105
|
-
[:li].each do |r|
|
106
|
-
assert_equal 'Allerheiligen', Holidays.on(Date.civil(2009,11,1), r)[0][:name]
|
107
|
-
end
|
data/definitions/lt.yaml
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
# Lithuanian holiday definitions for the Ruby Holiday gem.
|
2
|
-
#
|
3
|
-
# Updated: 2014-10-02
|
4
|
-
# Sources:
|
5
|
-
# - http://en.wikipedia.org/wiki/Public_holidays_in_Lithuania
|
6
|
-
# - http://day.lt/sventes/nedarbo
|
7
|
-
---
|
8
|
-
months:
|
9
|
-
0:
|
10
|
-
- name: Šv. Velykos
|
11
|
-
regions: [lt]
|
12
|
-
function: easter(year)
|
13
|
-
- name: Antroji Velykų diena
|
14
|
-
regions: [lt]
|
15
|
-
function: easter(year)
|
16
|
-
function_modifier: 1
|
17
|
-
1:
|
18
|
-
- name: Naujieji metai
|
19
|
-
regions: [lt]
|
20
|
-
mday: 1
|
21
|
-
2:
|
22
|
-
- name: Valstybės atkūrimo diena
|
23
|
-
regions: [lt]
|
24
|
-
mday: 16
|
25
|
-
3:
|
26
|
-
- name: Nepriklausomybės atkūrimo diena
|
27
|
-
regions: [lt]
|
28
|
-
mday: 11
|
29
|
-
5:
|
30
|
-
- name: Darbininkų diena
|
31
|
-
regions: [lt]
|
32
|
-
mday: 1
|
33
|
-
6:
|
34
|
-
- name: Joninės
|
35
|
-
regions: [lt]
|
36
|
-
mday: 24
|
37
|
-
7:
|
38
|
-
- name: Valstybės diena
|
39
|
-
regions: [lt]
|
40
|
-
mday: 6
|
41
|
-
8:
|
42
|
-
- name: Žolinė
|
43
|
-
regions: [lt]
|
44
|
-
mday: 15
|
45
|
-
11:
|
46
|
-
- name: Visų šventųjų diena
|
47
|
-
regions: [lt]
|
48
|
-
mday: 1
|
49
|
-
12:
|
50
|
-
- name: Šv. Kūčios
|
51
|
-
regions: [lt]
|
52
|
-
mday: 24
|
53
|
-
- name: Šv. Kalėdos
|
54
|
-
regions: [lt]
|
55
|
-
mday: 25
|
56
|
-
- name: Antroji Kalėdų diena
|
57
|
-
regions: [lt]
|
58
|
-
mday: 26
|
59
|
-
tests: |
|
60
|
-
{Date.civil(2008,1,1) => 'Naujieji metai',
|
61
|
-
Date.civil(2008,2,16) => 'Valstybės atkūrimo diena',
|
62
|
-
Date.civil(2008,3,11) => 'Nepriklausomybės atkūrimo diena',
|
63
|
-
Date.civil(2008,3,23) => 'Šv. Velykos',
|
64
|
-
Date.civil(2008,3,24) => 'Antroji Velykų diena',
|
65
|
-
Date.civil(2008,5,1) => 'Darbininkų diena',
|
66
|
-
Date.civil(2008,6,24) => 'Joninės',
|
67
|
-
Date.civil(2008,7,6) => 'Valstybės diena',
|
68
|
-
Date.civil(2008,8,15) => 'Žolinė',
|
69
|
-
Date.civil(2008,11,1) => 'Visų šventųjų diena',
|
70
|
-
Date.civil(2008,12,24) => 'Šv. Kūčios',
|
71
|
-
Date.civil(2008,12,25) => 'Šv. Kalėdos',
|
72
|
-
Date.civil(2008,12,26) => 'Antroji Kalėdų diena'}.each do |date, name|
|
73
|
-
assert_equal name, (Holidays.on(date, :lt)[0] || {})[:name]
|
74
|
-
end
|
75
|
-
{Date.civil(2012,1,1) => 'Naujieji metai',
|
76
|
-
Date.civil(2012,2,16) => 'Valstybės atkūrimo diena',
|
77
|
-
Date.civil(2012,3,11) => 'Nepriklausomybės atkūrimo diena',
|
78
|
-
Date.civil(2012,4,8) => 'Šv. Velykos',
|
79
|
-
Date.civil(2012,4,9) => 'Antroji Velykų diena',
|
80
|
-
Date.civil(2012,5,1) => 'Darbininkų diena',
|
81
|
-
Date.civil(2012,6,24) => 'Joninės',
|
82
|
-
Date.civil(2012,7,6) => 'Valstybės diena',
|
83
|
-
Date.civil(2012,8,15) => 'Žolinė',
|
84
|
-
Date.civil(2012,11,1) => 'Visų šventųjų diena',
|
85
|
-
Date.civil(2012,12,24) => 'Šv. Kūčios',
|
86
|
-
Date.civil(2012,12,25) => 'Šv. Kalėdos',
|
87
|
-
Date.civil(2012,12,26) => 'Antroji Kalėdų diena'}.each do |date, name|
|
88
|
-
assert_equal name, (Holidays.on(date, :lt)[0] || {})[:name]
|
89
|
-
end
|
data/definitions/lu.yaml
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# Luxembourg holiday definitions for the Ruby Holiday gem.
|
2
|
-
#
|
3
|
-
# Updated: 2019-07-19.
|
4
|
-
# Sources:
|
5
|
-
# - https://en.wikipedia.org/wiki/Public_holidays_in_Luxembourg
|
6
|
-
---
|
7
|
-
months:
|
8
|
-
0:
|
9
|
-
- name: Ouschterméindeg
|
10
|
-
regions: [lu]
|
11
|
-
function: easter(year)
|
12
|
-
function_modifier: 1
|
13
|
-
- name: Christi Himmelfaart
|
14
|
-
regions: [lu]
|
15
|
-
function: easter(year)
|
16
|
-
function_modifier: 39
|
17
|
-
- name: Péngschtméindeg
|
18
|
-
regions: [lu]
|
19
|
-
function: easter(year)
|
20
|
-
function_modifier: 49
|
21
|
-
1:
|
22
|
-
- name: Neijoerschdag
|
23
|
-
regions: [lu]
|
24
|
-
mday: 1
|
25
|
-
6:
|
26
|
-
- name: Nationalfeierdag
|
27
|
-
regions: [lu]
|
28
|
-
mday: 23
|
29
|
-
8:
|
30
|
-
- name: Léiffrawëschdag
|
31
|
-
regions: [lu]
|
32
|
-
mday: 15
|
33
|
-
11:
|
34
|
-
- name: Allerhellgen
|
35
|
-
regions: [lu]
|
36
|
-
mday: 1
|
37
|
-
12:
|
38
|
-
- name: Chrëschtdag
|
39
|
-
regions: [lu]
|
40
|
-
mday: 25
|
41
|
-
- name: Stiefesdag
|
42
|
-
regions: [lu]
|
43
|
-
mday: 26
|
44
|
-
tests: |
|
45
|
-
{Date.civil(2008,1,1) => 'Neijoerschdag',
|
46
|
-
Date.civil(2008,3,24) => 'Ouschterméindeg',
|
47
|
-
Date.civil(2008,5,1) => 'Christi Himmelfaart', # Ascension, Easter+39
|
48
|
-
Date.civil(2008,6,23) => 'Nationalfeierdag',
|
49
|
-
Date.civil(2008,8,15) => 'Léiffrawëschdag',
|
50
|
-
Date.civil(2008,11,1) => 'Allerhellgen',
|
51
|
-
Date.civil(2008,12,25) => 'Chrëschtdag',
|
52
|
-
Date.civil(2008,12,26) => 'Stiefesdag',
|
53
|
-
Date.civil(2008,5,11) => 'Péngschtméindeg'
|
54
|
-
}.each do |date, name|
|
55
|
-
assert_equal name, (Holidays.on(date, :lu, :informal)[0] || {})[:name]
|
56
|
-
end
|
data/definitions/ma.yaml
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# Morocco holiday (incomplete)definitions for the Ruby Holiday gem.
|
2
|
-
#
|
3
|
-
# Updated: 2013-07-01.
|
4
|
-
# Some dates in Islamic Calendar are missing.
|
5
|
-
# Sources:
|
6
|
-
# - http://en.wikipedia.org/wiki/Public_holidays_in_Morocco
|
7
|
-
---
|
8
|
-
months:
|
9
|
-
1:
|
10
|
-
- name: Ras l' âm
|
11
|
-
regions: [ma]
|
12
|
-
mday: 1
|
13
|
-
- name: Takdim watikat al-istiqlal
|
14
|
-
regions: [ma]
|
15
|
-
mday: 11
|
16
|
-
5:
|
17
|
-
- name: Eid Ash-Shughl
|
18
|
-
regions: [ma]
|
19
|
-
mday: 1
|
20
|
-
7:
|
21
|
-
- name: Eid Al-Ârch
|
22
|
-
regions: [ma]
|
23
|
-
mday: 30
|
24
|
-
8:
|
25
|
-
- name: Zikra Oued Ed-Dahab
|
26
|
-
regions: [ma]
|
27
|
-
mday: 14
|
28
|
-
- name: Thawrat al malik wa shâab
|
29
|
-
regions: [ma]
|
30
|
-
mday: 20
|
31
|
-
- name: Eid Al Milad
|
32
|
-
regions: [ma]
|
33
|
-
mday: 21
|
34
|
-
11:
|
35
|
-
- name: Eid Al Massira Al Khadra
|
36
|
-
regions: [ma]
|
37
|
-
mday: 6
|
38
|
-
- name: Eid Al Istiqulal
|
39
|
-
regions: [ma]
|
40
|
-
mday: 18
|
41
|
-
tests: |
|
42
|
-
{Date.civil(2007,1,1) => 'Ras l\' âm',
|
43
|
-
Date.civil(2007,1,11) => 'Takdim watikat al-istiqlal',
|
44
|
-
Date.civil(2007,5,1) => 'Eid Ash-Shughl',
|
45
|
-
Date.civil(2007,7,30) => 'Eid Al-Ârch',
|
46
|
-
Date.civil(2007,8,14) => 'Zikra Oued Ed-Dahab',
|
47
|
-
Date.civil(2007,8,20) => 'Thawrat al malik wa shâab',
|
48
|
-
Date.civil(2007,8,21) => 'Eid Al Milad',
|
49
|
-
Date.civil(2007,11,6) => 'Eid Al Massira Al Khadra',
|
50
|
-
Date.civil(2007,11,18) => 'Eid Al Istiqulal'}.each do |date, name|
|
51
|
-
assert_equal name, (Holidays.on(date, :ma, :informal)[0] || {})[:name]
|
52
|
-
end
|
data/definitions/mx.yaml
DELETED
@@ -1,106 +0,0 @@
|
|
1
|
-
# Mexican holiday definitions for the Ruby Holiday gem.
|
2
|
-
# Updated 2008-12-05.
|
3
|
-
# Sources:
|
4
|
-
# - http://www.britishembassy.gov.uk/servlet/Front?pagename=OpenMarket/Xcelerate/ShowPage&c=Page&cid=1125561634963
|
5
|
-
# - http://www.usembassy-mexico.gov/eng/holidays.html
|
6
|
-
---
|
7
|
-
months:
|
8
|
-
1:
|
9
|
-
- name: Año nuevo
|
10
|
-
regions: [mx]
|
11
|
-
mday: 1
|
12
|
-
- name: Dia de los Santos Reyes
|
13
|
-
regions: [mx]
|
14
|
-
mday: 6
|
15
|
-
2:
|
16
|
-
- name: Día de la Constitución
|
17
|
-
week: 1
|
18
|
-
regions: [mx]
|
19
|
-
wday: 1
|
20
|
-
3:
|
21
|
-
- name: Natalicio de Benito Juárez
|
22
|
-
week: 3
|
23
|
-
regions: [mx]
|
24
|
-
wday: 1
|
25
|
-
4:
|
26
|
-
- name: Día del Niño
|
27
|
-
regions: [mx]
|
28
|
-
mday: 30
|
29
|
-
type: informal
|
30
|
-
5:
|
31
|
-
- name: Día del Trabajo
|
32
|
-
regions: [mx]
|
33
|
-
mday: 1
|
34
|
-
- name: Cinco de Mayo
|
35
|
-
regions: [mx]
|
36
|
-
mday: 5
|
37
|
-
type: informal
|
38
|
-
- name: La Batalla de Puebla
|
39
|
-
regions: [mx_pue]
|
40
|
-
mday: 5
|
41
|
-
- name: Día de la Madre
|
42
|
-
regions: [mx]
|
43
|
-
mday: 10
|
44
|
-
type: informal
|
45
|
-
- name: Día del Maestro
|
46
|
-
regions: [mx]
|
47
|
-
mday: 15
|
48
|
-
type: informal
|
49
|
-
6:
|
50
|
-
- name: Día del Padre
|
51
|
-
regions: [mx]
|
52
|
-
wday: 0
|
53
|
-
week: 3
|
54
|
-
type: informal
|
55
|
-
9:
|
56
|
-
- name: Grito de Dolores
|
57
|
-
regions: [mx]
|
58
|
-
mday: 15
|
59
|
-
- name: Día de la Independencia
|
60
|
-
regions: [mx]
|
61
|
-
mday: 16
|
62
|
-
10:
|
63
|
-
- name: Día de la Raza
|
64
|
-
regions: [mx]
|
65
|
-
mday: 12
|
66
|
-
type: informal
|
67
|
-
11:
|
68
|
-
- name: Todos los Santos
|
69
|
-
regions: [mx]
|
70
|
-
mday: 1
|
71
|
-
type: informal
|
72
|
-
- name: Los Fieles Difuntos
|
73
|
-
regions: [mx]
|
74
|
-
mday: 2
|
75
|
-
type: informal
|
76
|
-
- name: Día de la Revolución
|
77
|
-
week: 3
|
78
|
-
regions: [mx]
|
79
|
-
wday: 1
|
80
|
-
12:
|
81
|
-
- name: Día de la Virgen de Guadalupe
|
82
|
-
regions: [mx]
|
83
|
-
mday: 12
|
84
|
-
type: informal
|
85
|
-
- name: Nochebuena
|
86
|
-
regions: [mx]
|
87
|
-
mday: 24
|
88
|
-
type: informal
|
89
|
-
- name: Navidad
|
90
|
-
regions: [mx]
|
91
|
-
mday: 25
|
92
|
-
- name: Los Santos Inocentes
|
93
|
-
regions: [mx]
|
94
|
-
mday: 28
|
95
|
-
tests: |
|
96
|
-
{Date.civil(2007,1,1) => 'Año nuevo',
|
97
|
-
Date.civil(2007,2,5) => 'Día de la Constitución',
|
98
|
-
Date.civil(2007,5,1) => 'Día del Trabajo',
|
99
|
-
Date.civil(2007,5,5) => 'Cinco de Mayo',
|
100
|
-
Date.civil(2007,9,16) => 'Día de la Independencia',
|
101
|
-
Date.civil(2007,11,1) => 'Todos los Santos',
|
102
|
-
Date.civil(2007,11,2) => 'Los Fieles Difuntos',
|
103
|
-
Date.civil(2007,11,19) => 'Día de la Revolución',
|
104
|
-
Date.civil(2007,12,25) => 'Navidad'}.each do |date, name|
|
105
|
-
assert_equal name, (Holidays.on(date, :mx, :informal)[0] || {})[:name]
|
106
|
-
end
|
data/definitions/my.yaml
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
# Malaysia holiday definitions for the Holidays gem!
|
2
|
-
|
3
|
-
# Days not included in the definitions (yet):
|
4
|
-
# Vesak Day (falls on the first full moon in May)
|
5
|
-
# Lunar New Year (falls on the first day of the Lunar Calendar)
|
6
|
-
# Hari Raya Puasa and Hari Raya Haji (based on moon sightings, Islamic Calendar)
|
7
|
-
# Deepavali (15th Day of September or October, based on the Hindu Calendar)
|
8
|
-
|
9
|
-
# Source:
|
10
|
-
# http://publicholidays.com.my/
|
11
|
-
|
12
|
-
months:
|
13
|
-
1:
|
14
|
-
- name: New Year's Day
|
15
|
-
regions: [my]
|
16
|
-
mday: 1
|
17
|
-
observed: to_weekday_if_weekend(date)
|
18
|
-
5:
|
19
|
-
- name: Labour Day
|
20
|
-
regions: [my]
|
21
|
-
mday: 1
|
22
|
-
6:
|
23
|
-
- name: Agong's Birthday
|
24
|
-
regions: [my]
|
25
|
-
mday: 4
|
26
|
-
observed: to_weekday_if_weekend(date)
|
27
|
-
8:
|
28
|
-
- name: Independence Day
|
29
|
-
regions: [my]
|
30
|
-
mday: 31
|
31
|
-
observed: to_weekday_if_weekend(date)
|
32
|
-
9:
|
33
|
-
- name: Malaysia Day
|
34
|
-
regions: [my]
|
35
|
-
mday: 16
|
36
|
-
observed: to_weekday_if_weekend(date)
|
37
|
-
12:
|
38
|
-
- name: Christmas Day
|
39
|
-
regions: [my]
|
40
|
-
mday: 25
|
41
|
-
observed: to_weekday_if_weekend(date)
|
42
|
-
|
43
|
-
tests: |
|
44
|
-
{Date.civil(2016,1,1) => "New Year's Day",
|
45
|
-
Date.civil(2016,5,1) => 'Labour Day',
|
46
|
-
Date.civil(2016,6,4) => "Agong's Birthday",
|
47
|
-
Date.civil(2016,8,31) => 'Independence Day',
|
48
|
-
Date.civil(2016,9,16) => 'Malaysia Day',
|
49
|
-
Date.civil(2016,12,25) => 'Christmas Day'}.each do |date, name|
|
50
|
-
assert_equal name, (Holidays.on(date, :my, :informal)[0] || {})[:name]
|
51
|
-
end
|