holidays 5.4.0 → 5.5.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/CHANGELOG.md +15 -0
- data/Makefile +1 -1
- data/README.md +6 -6
- data/Rakefile +7 -8
- data/lib/generated_definitions/REGIONS.rb +3 -1
- data/lib/generated_definitions/ar.rb +0 -6
- data/lib/generated_definitions/at.rb +0 -6
- data/lib/generated_definitions/au.rb +6 -9
- data/lib/generated_definitions/be_fr.rb +0 -6
- data/lib/generated_definitions/be_nl.rb +0 -6
- data/lib/generated_definitions/bg.rb +0 -6
- data/lib/generated_definitions/br.rb +0 -6
- data/lib/generated_definitions/ca.rb +0 -6
- data/lib/generated_definitions/ch.rb +0 -6
- data/lib/generated_definitions/cl.rb +0 -6
- data/lib/generated_definitions/cr.rb +0 -6
- data/lib/generated_definitions/cz.rb +0 -6
- data/lib/generated_definitions/de.rb +0 -6
- data/lib/generated_definitions/dk.rb +0 -6
- data/lib/generated_definitions/ecb_target.rb +0 -6
- data/lib/generated_definitions/el.rb +0 -6
- data/lib/generated_definitions/es.rb +0 -6
- data/lib/generated_definitions/europe.rb +0 -6
- data/lib/generated_definitions/federal_reserve.rb +0 -6
- data/lib/generated_definitions/fedex.rb +0 -6
- data/lib/generated_definitions/fi.rb +0 -6
- data/lib/generated_definitions/fr.rb +0 -6
- data/lib/generated_definitions/gb.rb +0 -6
- data/lib/generated_definitions/hk.rb +0 -6
- data/lib/generated_definitions/hr.rb +0 -6
- data/lib/generated_definitions/hu.rb +0 -6
- data/lib/generated_definitions/ie.rb +0 -6
- data/lib/generated_definitions/is.rb +0 -6
- data/lib/generated_definitions/it.rb +0 -6
- data/lib/generated_definitions/jp.rb +0 -6
- data/lib/generated_definitions/kr.rb +15 -225
- data/lib/generated_definitions/li.rb +0 -6
- data/lib/generated_definitions/lt.rb +0 -6
- data/lib/generated_definitions/lu.rb +0 -6
- data/lib/generated_definitions/ma.rb +0 -6
- data/lib/generated_definitions/mx.rb +0 -6
- data/lib/generated_definitions/my.rb +0 -6
- data/lib/generated_definitions/nerc.rb +0 -6
- data/lib/generated_definitions/nl.rb +0 -6
- data/lib/generated_definitions/no.rb +0 -6
- data/lib/generated_definitions/north_america.rb +0 -6
- data/lib/generated_definitions/nyse.rb +1 -7
- data/lib/generated_definitions/nz.rb +0 -6
- data/lib/generated_definitions/pe.rb +0 -6
- data/lib/generated_definitions/ph.rb +0 -6
- data/lib/generated_definitions/pl.rb +0 -6
- data/lib/generated_definitions/pt.rb +0 -6
- data/lib/generated_definitions/ro.rb +0 -6
- data/lib/generated_definitions/scandinavia.rb +0 -6
- data/lib/generated_definitions/se.rb +0 -6
- data/lib/generated_definitions/sg.rb +0 -6
- data/lib/generated_definitions/si.rb +0 -6
- data/lib/generated_definitions/sk.rb +0 -6
- data/lib/generated_definitions/tn.rb +0 -6
- data/lib/generated_definitions/united_nations.rb +0 -6
- data/lib/generated_definitions/ups.rb +0 -6
- data/lib/generated_definitions/us.rb +0 -6
- data/lib/generated_definitions/ve.rb +0 -6
- data/lib/generated_definitions/vi.rb +5 -10
- data/lib/generated_definitions/za.rb +0 -6
- data/lib/holidays.rb +0 -1
- data/lib/holidays/date_calculator/lunar_date.rb +371 -0
- data/lib/holidays/definition/context/function_processor.rb +20 -15
- data/lib/holidays/definition/context/generator.rb +0 -6
- data/lib/holidays/definition/context/load.rb +29 -0
- data/lib/holidays/definition/context/merger.rb +0 -4
- data/lib/holidays/definition/generator/regions.rb +50 -0
- data/lib/holidays/definition/repository/cache.rb +20 -7
- data/lib/holidays/definition/repository/proc_result_cache.rb +1 -1
- data/lib/holidays/definition/repository/regions.rb +23 -13
- data/lib/holidays/definition/validator/custom_method.rb +1 -1
- data/lib/holidays/definition/validator/region.rb +2 -9
- data/lib/holidays/factory/date_calculator.rb +5 -0
- data/lib/holidays/factory/definition.rb +17 -1
- data/lib/holidays/factory/finder.rb +1 -1
- data/lib/holidays/finder/context/between.rb +3 -0
- data/lib/holidays/finder/context/parse_options.rb +53 -52
- data/lib/holidays/finder/context/search.rb +23 -6
- data/lib/holidays/finder/rules/in_region.rb +1 -1
- data/lib/holidays/load_all_definitions.rb +9 -0
- data/lib/holidays/version.rb +1 -1
- data/test/data/test_invalid_region.rb +15 -0
- data/test/data/test_region.rb +15 -0
- data/test/defs/test_defs_au.rb +11 -1
- data/test/defs/test_defs_kr.rb +15 -12
- data/test/defs/test_defs_nyse.rb +5 -0
- data/test/defs/test_defs_vi.rb +6 -4
- data/test/holidays/date_calculator/test_lunar_date.rb +89 -0
- data/test/holidays/definition/context/test_function_processor.rb +47 -23
- data/test/holidays/definition/context/test_generator.rb +3 -3
- data/test/holidays/definition/context/test_load.rb +37 -0
- data/test/holidays/definition/generator/test_regions.rb +97 -0
- data/test/holidays/definition/repository/test_cache.rb +47 -6
- data/test/holidays/definition/repository/test_proc_result_cache.rb +7 -0
- data/test/holidays/definition/repository/test_regions.rb +31 -13
- data/test/holidays/definition/validator/test_custom_method.rb +5 -0
- data/test/holidays/definition/validator/test_region.rb +7 -12
- data/test/holidays/factory/test_date_calculator.rb +5 -0
- data/test/holidays/factory/test_definition.rb +9 -0
- data/test/holidays/finder/context/test_parse_options.rb +102 -33
- data/test/holidays/finder/context/test_search.rb +45 -16
- data/test/integration/test_available_regions.rb +1 -1
- data/test/integration/test_custom_year_range_holidays.rb +0 -1
- data/test/integration/test_holidays.rb +3 -3
- data/test/integration/test_multiple_regions.rb +0 -1
- metadata +16 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eeddef93de6ad3c186c8a49bcd3448b66d8f5a15
|
|
4
|
+
data.tar.gz: 3b3a7a880b2741cc3ed88b5591c925280394bd59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b550fefcf6a87a08245534ab19a1ff25dec5a52c15096c402f6d3f1125706e116ba52669e9ae414586284b9c5bd4a906836f4a0ea4636b06ed729b4da0385316
|
|
7
|
+
data.tar.gz: f256f88c64b861204ba8987fc8e8cba702c2ebdb67998af5d5d2d4fe9976a0e5093a6345f950edeee36846be510ad92bdd6480d71d99a9b5f26b23fde893e6ba
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Ruby Holidays Gem CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 5.5.0
|
|
4
|
+
|
|
5
|
+
* Fix [#251](https://github.com/holidays/holidays/issues/251): `load_custom` would override all other definitions
|
|
6
|
+
* Fix [#266](https://github.com/holidays/holidays/issues/266): `:any` does not return expected results
|
|
7
|
+
* Fix [#265](https://github.com/holidays/holidays/issues/265): Jersey/je not loaded as expected when pulling `:gb`
|
|
8
|
+
* Add lunar date calculations, which are used in `:kr` and `:vi` definitions (thanks to https://github.com/jonathanpike)
|
|
9
|
+
* Improve cache performance (thanks to https://github.com/mzruya)
|
|
10
|
+
* Remove incorrect comments in definition generation (thanks to https://github.com/morrme)
|
|
11
|
+
* Fix bug related to definition functions inadvertently affecting subsequent date calculations
|
|
12
|
+
* Point to latest version (1.5.0) of definitions, which includes:
|
|
13
|
+
* Add Vietnamese holidays
|
|
14
|
+
* Updates Australian holidays
|
|
15
|
+
* Updates Korean holidays to use native language and fancy lunar date calculations
|
|
16
|
+
* Fix NYSE definitions to correctly calculate observed "New Year's Day"
|
|
17
|
+
|
|
3
18
|
## 5.4.0
|
|
4
19
|
|
|
5
20
|
* Add support for ruby 2.4.0 (added it to the required tests in Travis CI)
|
data/Makefile
CHANGED
data/README.md
CHANGED
|
@@ -12,14 +12,14 @@ To install the gem from RubyGems:
|
|
|
12
12
|
|
|
13
13
|
gem install holidays
|
|
14
14
|
|
|
15
|
-
The Holidays gem is tested on Ruby 2.
|
|
15
|
+
The Holidays gem is tested on Ruby 2.1.0, 2.2.0, 2.3.0, 2.4.0 and JRuby.
|
|
16
16
|
|
|
17
17
|
This gem follows [semantic versioning](http://semver.org/). The only methods covered by this guarantee are under the
|
|
18
18
|
`Holidays` namespace specifically. Anything that is not a method off of `Holidays` or the core extension is not covered by
|
|
19
19
|
semver. Please take this into account when relying on this gem as a dependency.
|
|
20
20
|
|
|
21
21
|
Also note that we consider definition changes as 'minor' bumps, meaning they are backwards compatible with your code
|
|
22
|
-
but might give different holiday results!
|
|
22
|
+
but might give different holiday results!
|
|
23
23
|
|
|
24
24
|
## Time zones
|
|
25
25
|
|
|
@@ -156,7 +156,6 @@ Or find end of month for given date (requires 'Time' extensions as well):
|
|
|
156
156
|
d.end_of_month
|
|
157
157
|
=> #<Date: 2016-08-31 ((2457632j,0s,0n),+0s,2299161j)>
|
|
158
158
|
|
|
159
|
-
|
|
160
159
|
### Caching Holiday Lookups
|
|
161
160
|
|
|
162
161
|
If you are checking holidays regularly you can cache your results for improved performance. Run this before looking up a holiday (eg. in an initializer):
|
|
@@ -171,8 +170,9 @@ See our [contribution guidelines](CONTRIBUTING.md) for information on how to hel
|
|
|
171
170
|
|
|
172
171
|
### Credits and code
|
|
173
172
|
|
|
174
|
-
* Started by [
|
|
175
|
-
* Maintained by [
|
|
176
|
-
* Maintained by [
|
|
173
|
+
* Started by [@alexdunae](http://github.com/alexdunae) 2007-2012
|
|
174
|
+
* Maintained by [@hahahana](https://github.com/hahahana), 2013
|
|
175
|
+
* Maintained by [@ppeble](https://github.com/ppeble), 2014-present
|
|
176
|
+
* Maintained by [@ttwo32](https://github.com/ttwo32), 2016-present
|
|
177
177
|
|
|
178
178
|
Plus all of these [wonderful contributors!](https://github.com/holidays/holidays/contributors)
|
data/Rakefile
CHANGED
|
@@ -54,7 +54,10 @@ namespace :generate do
|
|
|
54
54
|
# create a dir for the generated tests
|
|
55
55
|
FileUtils.mkdir_p(DEFINITION_TESTS_PATH)
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
#TODO This entire section should be moved into '/lib/holidays/definition'. I don't think such an
|
|
58
|
+
# important part of the gem should be left in the Rakefile and without unit tests. There's no
|
|
59
|
+
# reason we can't move it.
|
|
60
|
+
all_regions = {}
|
|
58
61
|
|
|
59
62
|
def_index['defs'].each do |region, files|
|
|
60
63
|
puts "Building #{region} definition module:"
|
|
@@ -72,7 +75,7 @@ namespace :generate do
|
|
|
72
75
|
end
|
|
73
76
|
end
|
|
74
77
|
|
|
75
|
-
all_regions
|
|
78
|
+
all_regions[region.downcase.to_sym] = regions
|
|
76
79
|
|
|
77
80
|
puts "Done.\n\n"
|
|
78
81
|
end
|
|
@@ -80,12 +83,7 @@ namespace :generate do
|
|
|
80
83
|
puts "Building regions master file for later validation:"
|
|
81
84
|
|
|
82
85
|
File.open("lib/#{Holidays::DEFINITIONS_PATH}/REGIONS.rb","w") do |file|
|
|
83
|
-
file.puts
|
|
84
|
-
# encoding: utf-8
|
|
85
|
-
module Holidays
|
|
86
|
-
REGIONS = [:#{all_regions.join(', :')}]
|
|
87
|
-
end
|
|
88
|
-
EOR
|
|
86
|
+
file.puts Holidays::Factory::Definition.regions_generator.call(all_regions)
|
|
89
87
|
end
|
|
90
88
|
|
|
91
89
|
puts "Done.\n\n"
|
|
@@ -94,6 +92,7 @@ end
|
|
|
94
92
|
desc 'Build the definition manifest'
|
|
95
93
|
task :manifest do
|
|
96
94
|
File.open("lib/#{Holidays::DEFINITIONS_PATH}/MANIFEST","w") do |file|
|
|
95
|
+
#TODO Generating the file source should be done interally, in the /lib dir, not in the Rakefile
|
|
97
96
|
file.puts <<-EOH
|
|
98
97
|
==== Regional definitions
|
|
99
98
|
The following definition files are included in this installation:
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
module Holidays
|
|
3
|
-
REGIONS = [:ar, :at, :au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :
|
|
3
|
+
REGIONS = [:ar, :at, :au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_wa, :au_tas, :au_tas_south, :au_qld_cairns, :au_qld_brisbane, :au_tas_north, :au_vic_melbourne, :be_fr, :be_nl, :br, :bg_en, :bg_bg, :ca, :ca_qc, :ca_ab, :ca_sk, :ca_on, :ca_bc, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_nb, :ca_yt, :us, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_ne, :ch_ge, :ch_ju, :ch_vs, :ch, :cl, :cr, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_eichsfeld, :de_sn, :de_st, :de_by_augsburg, :de_bb, :de_mv, :de_th, :ecb_target, :el, :es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex, :es, :es_ct, :es_v, :es_vc, :federal_reserve, :fedex, :fi, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom, :hr, :hk, :hu, :ie, :is, :it, :kr, :li, :lt, :ma, :mx, :mx_pue, :nerc, :nl, :lu, :no, :nyse, :nz, :nz_sl, :nz_we, :nz_ak, :nz_nl, :nz_ne, :nz_ot, :nz_ta, :nz_sc, :nz_hb, :nz_mb, :nz_ca, :nz_ch, :nz_wl, :pe, :ph, :pl, :pt, :ro, :se, :tn, :us_dc, :us_ca, :united_nations, :ups, :za, :sk, :si, :jp, :ve, :vi, :sg, :my]
|
|
4
|
+
|
|
5
|
+
PARENT_REGION_LOOKUP = {:ar=>:ar, :at=>:at, :au=>:au, :au_nsw=>:au, :au_vic=>:au, :au_qld=>:au, :au_nt=>:au, :au_act=>:au, :au_sa=>:au, :au_wa=>:au, :au_tas=>:au, :au_tas_south=>:au, :au_qld_cairns=>:au, :au_qld_brisbane=>:au, :au_tas_north=>:au, :au_vic_melbourne=>:au, :be_fr=>:be_fr, :be_nl=>:be_nl, :br=>:br, :bg_en=>:bg, :bg_bg=>:bg, :ca=>:ca, :ca_qc=>:ca, :ca_ab=>:ca, :ca_sk=>:ca, :ca_on=>:ca, :ca_bc=>:ca, :ca_mb=>:ca, :ca_ns=>:ca, :ca_pe=>:ca, :ca_nl=>:ca, :ca_nt=>:ca, :ca_nu=>:ca, :ca_nb=>:ca, :ca_yt=>:ca, :us=>:ca, :ch_zh=>:ch, :ch_be=>:ch, :ch_lu=>:ch, :ch_ur=>:ch, :ch_sz=>:ch, :ch_ow=>:ch, :ch_nw=>:ch, :ch_gl=>:ch, :ch_zg=>:ch, :ch_fr=>:ch, :ch_so=>:ch, :ch_bs=>:ch, :ch_bl=>:ch, :ch_sh=>:ch, :ch_ar=>:ch, :ch_ai=>:ch, :ch_sg=>:ch, :ch_gr=>:ch, :ch_ag=>:ch, :ch_tg=>:ch, :ch_ti=>:ch, :ch_vd=>:ch, :ch_ne=>:ch, :ch_ge=>:ch, :ch_ju=>:ch, :ch_vs=>:ch, :ch=>:ch, :cl=>:cl, :cr=>:cr, :cz=>:cz, :dk=>:dk, :de=>:de, :de_bw=>:de, :de_by=>:de, :de_he=>:de, :de_nw=>:de, :de_rp=>:de, :de_sl=>:de, :de_sn_sorbian=>:de, :de_th_eichsfeld=>:de, :de_sn=>:de, :de_st=>:de, :de_by_augsburg=>:de, :de_bb=>:de, :de_mv=>:de, :de_th=>:de, :ecb_target=>:ecb_target, :el=>:el, :es_pv=>:es, :es_na=>:es, :es_an=>:es, :es_ib=>:es, :es_cm=>:es, :es_mu=>:es, :es_m=>:es, :es_ar=>:es, :es_cl=>:es, :es_cn=>:es, :es_lo=>:es, :es_ga=>:es, :es_ce=>:es, :es_o=>:es, :es_ex=>:es, :es=>:es, :es_ct=>:es, :es_v=>:es, :es_vc=>:es, :federal_reserve=>:federal_reserve, :fedex=>:fedex, :fi=>:fi, :fr=>:fr, :gb=>:gb, :gb_eng=>:gb, :gb_wls=>:gb, :gb_eaw=>:gb, :gb_nir=>:gb, :gb_sct=>:gb, :gb_con=>:gb, :je=>:gb, :gb_jsy=>:gb, :gg=>:gb, :gb_gsy=>:gb, :im=>:gb, :gb_iom=>:gb, :hr=>:hr, :hk=>:hk, :hu=>:hu, :ie=>:ie, :is=>:is, :it=>:it, :kr=>:kr, :li=>:li, :lt=>:lt, :ma=>:ma, :mx=>:mx, :mx_pue=>:mx, :nerc=>:nerc, :nl=>:nl, :lu=>:lu, :no=>:no, :nyse=>:nyse, :nz=>:nz, :nz_sl=>:nz, :nz_we=>:nz, :nz_ak=>:nz, :nz_nl=>:nz, :nz_ne=>:nz, :nz_ot=>:nz, :nz_ta=>:nz, :nz_sc=>:nz, :nz_hb=>:nz, :nz_mb=>:nz, :nz_ca=>:nz, :nz_ch=>:nz, :nz_wl=>:nz, :pe=>:pe, :ph=>:ph, :pl=>:pl, :pt=>:pt, :ro=>:ro, :se=>:se, :tn=>:tn, :us_dc=>:us, :us_ca=>:us, :united_nations=>:united_nations, :ups=>:ups, :za=>:za, :sk=>:europe, :si=>:europe, :jp=>:jp, :ve=>:ve, :vi=>:vi, :sg=>:sg, :my=>:my}
|
|
4
6
|
end
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/ar.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/ar'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module AR # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/at.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/at'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module AT # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,16 +4,10 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/au.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/au'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module AU # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
16
|
-
[:au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :
|
|
10
|
+
[:au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_wa, :au_tas, :au_tas_south, :au_qld_cairns, :au_qld_brisbane, :au_tas_north, :au_vic_melbourne]
|
|
17
11
|
end
|
|
18
12
|
|
|
19
13
|
def self.holidays_by_month
|
|
@@ -21,14 +15,17 @@ module Holidays
|
|
|
21
15
|
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:au]},
|
|
22
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Easter Saturday", :regions => [:au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa]},
|
|
23
17
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:au_nsw, :au_vic]},
|
|
18
|
+
{:function => "easter(year)", :function_arguments => [:year], :year_ranges => [{:after => 2017}],:name => "Easter Sunday", :regions => [:au_qld]},
|
|
24
19
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:au]}],
|
|
25
|
-
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:au]},
|
|
20
|
+
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:au, :au_nsw, :au_vic, :au_act, :au_sa, :au_wa, :au_nt, :au_qld]},
|
|
21
|
+
{:mday => 1, :function => "to_monday_if_weekend(date)", :function_arguments => [:date], :name => "New Year's Day", :regions => [:au_tas]},
|
|
26
22
|
{:mday => 26, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Australia Day", :regions => [:au]}],
|
|
27
23
|
2 => [{:wday => 1, :week => 2, :name => "Royal Hobart Regatta", :regions => [:au_tas_south]}],
|
|
28
24
|
3 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_wa]},
|
|
29
25
|
{:wday => 1, :week => 2, :name => "Eight Hours Day", :regions => [:au_tas]},
|
|
30
26
|
{:wday => 1, :week => 2, :name => "Labour Day", :regions => [:au_vic]},
|
|
31
|
-
{:function => "march_pub_hol_sa(year)", :function_arguments => [:year], :name => "March Public Holiday", :regions => [:au_sa]}
|
|
27
|
+
{:function => "march_pub_hol_sa(year)", :function_arguments => [:year], :name => "March Public Holiday", :regions => [:au_sa]},
|
|
28
|
+
{:wday => 1, :week => 2, :name => "Canberra Day", :regions => [:au_act]}],
|
|
32
29
|
4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au]},
|
|
33
30
|
{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "ANZAC Day", :regions => [:au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_tas]},
|
|
34
31
|
{:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "ANZAC Day", :regions => [:au_wa]}],
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/be_fr.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/be_fr'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module BE_FR # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/be_nl.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/be_nl'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module BE_NL # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/bg.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/bg'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module BG # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/br.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/br'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module BR # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/ca.yaml, definitions/north_america_informal.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/ca'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module CA # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/ch.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/ch'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module CH # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/cl.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/cl'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module CL # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/cr.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/cr'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module CR # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/cz.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/cz'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module CZ # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/de.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/de'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module DE # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/dk.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/dk'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module DK # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/ecb_target.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/ecb_target'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module ECB_TARGET # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/el.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/el'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module EL # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/es.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/es'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module ES # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/at.yaml, definitions/be_fr.yaml, definitions/be_nl.yaml, definitions/ch.yaml, definitions/cz.yaml, definitions/dk.yaml, definitions/de.yaml, definitions/el.yaml, definitions/es.yaml, definitions/fr.yaml, definitions/gb.yaml, definitions/hr.yaml, definitions/hu.yaml, definitions/ie.yaml, definitions/is.yaml, definitions/it.yaml, definitions/li.yaml, definitions/lt.yaml, definitions/nl.yaml, definitions/no.yaml, definitions/pl.yaml, definitions/pt.yaml, definitions/ro.yaml, definitions/sk.yaml, definitions/si.yaml, definitions/bg.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/europe'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module EUROPE # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/federal_reserve.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/federal_reserve'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module FEDERAL_RESERVE # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/fedex.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/fedex'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module FEDEX # :nodoc:
|
|
15
9
|
def self.defined_regions
|
|
@@ -4,12 +4,6 @@ module Holidays
|
|
|
4
4
|
#
|
|
5
5
|
# Definitions loaded: definitions/fi.yaml
|
|
6
6
|
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/fi'
|
|
12
|
-
#
|
|
13
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
8
|
module FI # :nodoc:
|
|
15
9
|
def self.defined_regions
|