holidays 4.7.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/za.yaml
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
# South African holiday definitions for the Ruby Holiday gem.
|
2
|
-
#
|
3
|
-
# Updated: 2008-11-29.
|
4
|
-
# Sources:
|
5
|
-
# - http://en.wikipedia.org/wiki/Public_holidays_in_South_Africa
|
6
|
-
# - http://www.info.gov.za/aboutsa/holidays.htm
|
7
|
-
---
|
8
|
-
months:
|
9
|
-
0:
|
10
|
-
- name: Good Friday
|
11
|
-
regions: [za]
|
12
|
-
function: easter(year)
|
13
|
-
function_modifier: -2
|
14
|
-
- name: Family Day
|
15
|
-
regions: [za]
|
16
|
-
function: easter(year)
|
17
|
-
function_modifier: 1
|
18
|
-
1:
|
19
|
-
- name: New Year's Day
|
20
|
-
regions: [za]
|
21
|
-
mday: 1
|
22
|
-
observed: to_monday_if_sunday(date)
|
23
|
-
3:
|
24
|
-
- name: Human Rights Day
|
25
|
-
regions: [za]
|
26
|
-
mday: 21
|
27
|
-
observed: to_monday_if_sunday(date)
|
28
|
-
4:
|
29
|
-
- name: Freedom Day
|
30
|
-
regions: [za]
|
31
|
-
mday: 27
|
32
|
-
observed: to_monday_if_sunday(date)
|
33
|
-
5:
|
34
|
-
- name: Workers Day
|
35
|
-
regions: [za]
|
36
|
-
mday: 1
|
37
|
-
observed: to_monday_if_sunday(date)
|
38
|
-
6:
|
39
|
-
- name: Youth Day
|
40
|
-
regions: [za]
|
41
|
-
mday: 16
|
42
|
-
observed: to_monday_if_sunday(date)
|
43
|
-
8:
|
44
|
-
- name: National Women's Day
|
45
|
-
regions: [za]
|
46
|
-
mday: 9
|
47
|
-
observed: to_monday_if_sunday(date)
|
48
|
-
9:
|
49
|
-
- name: Heritage Day
|
50
|
-
regions: [za]
|
51
|
-
mday: 24
|
52
|
-
observed: to_monday_if_sunday(date)
|
53
|
-
12:
|
54
|
-
- name: Day of Reconciliation
|
55
|
-
regions: [za]
|
56
|
-
mday: 16
|
57
|
-
observed: to_monday_if_sunday(date)
|
58
|
-
- name: Christmas Day
|
59
|
-
regions: [za]
|
60
|
-
mday: 25
|
61
|
-
observed: to_monday_if_sunday(date)
|
62
|
-
- name: Day of Goodwill
|
63
|
-
regions: [za]
|
64
|
-
mday: 26
|
65
|
-
observed: to_weekday_if_boxing_weekend(date)
|
66
|
-
tests: |
|
67
|
-
{Date.civil(2007,1,1) => 'New Year\'s Day',
|
68
|
-
Date.civil(2007,3,21) => 'Human Rights Day',
|
69
|
-
Date.civil(2007,4,6) => 'Good Friday',
|
70
|
-
Date.civil(2007,4,9) => 'Family Day',
|
71
|
-
Date.civil(2007,4,27) => 'Freedom Day',
|
72
|
-
Date.civil(2007,5,1) => 'Workers Day',
|
73
|
-
Date.civil(2007,6,16) => 'Youth Day',
|
74
|
-
Date.civil(2007,8,9) => 'National Women\'s Day',
|
75
|
-
Date.civil(2007,9,24) => 'Heritage Day',
|
76
|
-
Date.civil(2007,12,16) => 'Day of Reconciliation',
|
77
|
-
Date.civil(2007,12,25) => 'Christmas Day',
|
78
|
-
Date.civil(2007,12,26) => 'Day of Goodwill'}.each do |date, name|
|
79
|
-
assert_equal name, (Holidays.on(date, :za, :informal)[0] || {})[:name]
|
80
|
-
end
|