business_calendar 0.0.7 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/.simplecov +8 -0
- data/.travis.yml +25 -0
- data/Gemfile +2 -0
- data/README.md +27 -12
- data/business_calendar.gemspec +2 -3
- data/data/BR.yml +17 -0
- data/data/CN.yml +116 -0
- data/data/GB.yml +54 -0
- data/data/US.yml +236 -0
- data/gemfiles/ree.gemfile +7 -0
- data/lib/business_calendar/calendar.rb +5 -2
- data/lib/business_calendar/holiday_determiner.rb +2 -3
- data/lib/business_calendar/ruby18_shim.rb +13 -0
- data/lib/business_calendar/version.rb +1 -1
- data/lib/business_calendar.rb +26 -17
- data/spec/acceptance_cn_spec.rb +44 -16
- data/spec/acceptance_gb_spec.rb +18 -1
- data/spec/acceptance_us_spec.rb +226 -39
- data/spec/business_calendar_spec.rb +7 -3
- data/spec/spec_helper.rb +4 -1
- metadata +20 -49
- data/data/holidays.yml +0 -137
data/data/holidays.yml
DELETED
@@ -1,137 +0,0 @@
|
|
1
|
-
# +additions_only+ will tell business_calendar to not attempt to fetch holidays from the underlying
|
2
|
-
# `holidays` gem, and instead only use the defined +addtions+ here. Useful e.g. for cases where a
|
3
|
-
# country is not even defined in the `holidays` gem.
|
4
|
-
# Defaults to `false`
|
5
|
-
|
6
|
-
US:
|
7
|
-
regions:
|
8
|
-
- 'us'
|
9
|
-
holiday_names:
|
10
|
-
- "New Year's Day"
|
11
|
-
- "Martin Luther King, Jr. Day"
|
12
|
-
- "Presidents' Day"
|
13
|
-
- "Memorial Day"
|
14
|
-
- "Independence Day"
|
15
|
-
- "Labor Day"
|
16
|
-
- "Columbus Day"
|
17
|
-
- "Veterans Day"
|
18
|
-
- "Thanksgiving"
|
19
|
-
- "Christmas Day"
|
20
|
-
|
21
|
-
GB:
|
22
|
-
regions:
|
23
|
-
- 'gb'
|
24
|
-
- 'gb_eng'
|
25
|
-
holiday_names:
|
26
|
-
- "Good Friday"
|
27
|
-
- "Easter Sunday"
|
28
|
-
- "Easter Monday"
|
29
|
-
- "May Day"
|
30
|
-
- "Bank Holiday"
|
31
|
-
- "Christmas Day"
|
32
|
-
- "Boxing Day"
|
33
|
-
- "New Year's Day"
|
34
|
-
additions:
|
35
|
-
- '2002-06-04' # Summer Banking Holiday
|
36
|
-
- '2012-06-04'
|
37
|
-
removals:
|
38
|
-
- '2002-05-28'
|
39
|
-
- '2012-05-28'
|
40
|
-
|
41
|
-
# TODO: Add CN capability and holidays to holidays gem
|
42
|
-
CN:
|
43
|
-
regions:
|
44
|
-
- 'cn'
|
45
|
-
additions:
|
46
|
-
- '2014-01-01'
|
47
|
-
- '2014-01-31'
|
48
|
-
- '2014-02-01'
|
49
|
-
- '2014-02-02'
|
50
|
-
- '2014-02-03'
|
51
|
-
- '2014-02-04'
|
52
|
-
- '2014-02-05'
|
53
|
-
- '2014-02-06'
|
54
|
-
- '2014-04-05'
|
55
|
-
- '2014-04-06'
|
56
|
-
- '2014-04-07'
|
57
|
-
- '2014-05-01'
|
58
|
-
- '2014-05-02'
|
59
|
-
- '2014-05-03'
|
60
|
-
- '2014-05-31'
|
61
|
-
- '2014-06-01'
|
62
|
-
- '2014-06-02'
|
63
|
-
- '2014-09-06'
|
64
|
-
- '2014-09-07'
|
65
|
-
- '2014-09-08'
|
66
|
-
- '2014-10-01'
|
67
|
-
- '2014-10-02'
|
68
|
-
- '2014-10-03'
|
69
|
-
- '2014-10-04'
|
70
|
-
- '2014-10-05'
|
71
|
-
- '2014-10-06'
|
72
|
-
- '2014-10-07'
|
73
|
-
- '2015-01-01'
|
74
|
-
- '2015-01-02'
|
75
|
-
- '2015-01-03'
|
76
|
-
- '2015-02-18'
|
77
|
-
- '2015-02-19'
|
78
|
-
- '2015-02-20'
|
79
|
-
- '2015-02-21'
|
80
|
-
- '2015-02-22'
|
81
|
-
- '2015-02-23'
|
82
|
-
- '2015-02-24'
|
83
|
-
- '2015-04-05'
|
84
|
-
- '2015-04-06'
|
85
|
-
- '2015-05-01'
|
86
|
-
- '2015-06-22'
|
87
|
-
- '2015-09-27'
|
88
|
-
- '2015-10-01'
|
89
|
-
- '2015-10-02'
|
90
|
-
- '2015-10-03'
|
91
|
-
- '2015-10-04'
|
92
|
-
- '2015-10-05'
|
93
|
-
- '2015-10-06'
|
94
|
-
- '2015-10-07'
|
95
|
-
- '2016-01-01'
|
96
|
-
- '2016-01-02'
|
97
|
-
- '2016-01-03'
|
98
|
-
- '2016-02-18'
|
99
|
-
- '2016-02-19'
|
100
|
-
- '2016-02-20'
|
101
|
-
- '2016-02-21'
|
102
|
-
- '2016-02-22'
|
103
|
-
- '2016-02-23'
|
104
|
-
- '2016-02-24'
|
105
|
-
- '2016-04-05'
|
106
|
-
- '2016-04-06'
|
107
|
-
- '2016-05-01'
|
108
|
-
- '2016-05-02'
|
109
|
-
- '2016-05-03'
|
110
|
-
- '2016-06-20'
|
111
|
-
- '2016-06-21'
|
112
|
-
- '2016-06-22'
|
113
|
-
- '2016-09-27'
|
114
|
-
- '2016-09-28'
|
115
|
-
- '2016-09-29'
|
116
|
-
- '2016-10-01'
|
117
|
-
- '2016-10-02'
|
118
|
-
- '2016-10-03'
|
119
|
-
- '2016-10-04'
|
120
|
-
- '2016-10-05'
|
121
|
-
- '2016-10-06'
|
122
|
-
- '2016-10-07'
|
123
|
-
additions_only: true
|
124
|
-
holiday_names: [] # Not needed cause all holidays are via manual +additions+
|
125
|
-
|
126
|
-
BR:
|
127
|
-
regions:
|
128
|
-
- 'br'
|
129
|
-
holiday_names:
|
130
|
-
- "Dia da Confraternização Universal"
|
131
|
-
- "Dia de Tiradentes"
|
132
|
-
- "Dia do Trabalho"
|
133
|
-
- "Proclamação da Independência"
|
134
|
-
- "Dia de Nossa Senhora Aparecida"
|
135
|
-
- "Dia de Finados"
|
136
|
-
- "Proclamação da República"
|
137
|
-
- "Natal"
|