holidays 7.1.0 → 8.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 +36 -1
- data/README.md +3 -4
- data/doc/CONTRIBUTING.md +2 -1
- data/holidays.gemspec +5 -5
- data/lib/generated_definitions/MANIFEST +3 -0
- data/lib/generated_definitions/REGIONS.rb +2 -2
- data/lib/generated_definitions/ar.rb +27 -8
- data/lib/generated_definitions/au.rb +10 -4
- data/lib/generated_definitions/ca.rb +21 -16
- data/lib/generated_definitions/ch.rb +13 -1
- data/lib/generated_definitions/cl.rb +5 -5
- data/lib/generated_definitions/de.rb +5 -4
- data/lib/generated_definitions/es.rb +4 -2
- data/lib/generated_definitions/europe.rb +87 -24
- data/lib/generated_definitions/federalreservebanks.rb +1 -0
- data/lib/generated_definitions/gb.rb +10 -5
- data/lib/generated_definitions/hr.rb +8 -6
- data/lib/generated_definitions/hu.rb +3 -2
- data/lib/generated_definitions/it.rb +14 -5
- data/lib/generated_definitions/jp.rb +26 -21
- data/lib/generated_definitions/kz.rb +38 -0
- data/lib/generated_definitions/lu.rb +2 -0
- data/lib/generated_definitions/lv.rb +52 -0
- data/lib/generated_definitions/mx.rb +3 -3
- data/lib/generated_definitions/ng.rb +33 -0
- data/lib/generated_definitions/northamerica.rb +28 -23
- data/lib/generated_definitions/ro.rb +5 -2
- data/lib/generated_definitions/southamerica.rb +30 -11
- data/lib/generated_definitions/tr.rb +5 -3
- data/lib/generated_definitions/ua.rb +6 -6
- data/lib/generated_definitions/us.rb +6 -6
- data/lib/generated_definitions/za.rb +1 -1
- data/lib/holidays/definition/context/generator.rb +20 -34
- data/lib/holidays/definition/repository/holidays_by_month.rb +9 -1
- data/lib/holidays/finder/context/search.rb +34 -31
- data/lib/holidays/finder/rules/year_range.rb +30 -54
- data/lib/holidays/version.rb +1 -1
- data/lib/holidays.rb +2 -0
- data/test/coverage_report.rb +23 -5
- data/test/data/test_custom_year_range_holiday_defs.yaml +6 -10
- data/test/data/test_multiple_regions_with_conflicts_region_1.yaml +38 -0
- data/test/data/test_multiple_regions_with_conflicts_region_2.yaml +38 -0
- data/test/defs/test_defs_ar.rb +20 -4
- data/test/defs/test_defs_au.rb +2 -0
- data/test/defs/test_defs_ca.rb +41 -10
- data/test/defs/test_defs_ch.rb +4 -0
- data/test/defs/test_defs_co.rb +3 -3
- data/test/defs/test_defs_de.rb +2 -0
- data/test/defs/test_defs_es.rb +2 -0
- data/test/defs/test_defs_europe.rb +164 -11
- data/test/defs/test_defs_federalreservebanks.rb +24 -0
- data/test/defs/test_defs_gb.rb +24 -0
- data/test/defs/test_defs_hr.rb +6 -6
- data/test/defs/test_defs_hu.rb +12 -4
- data/test/defs/test_defs_it.rb +20 -0
- data/test/defs/test_defs_jp.rb +5 -3
- data/test/defs/test_defs_kz.rb +39 -0
- data/test/defs/test_defs_lu.rb +6 -0
- data/test/defs/test_defs_lv.rb +90 -0
- data/test/defs/test_defs_ng.rb +29 -0
- data/test/defs/test_defs_northamerica.rb +51 -20
- data/test/defs/test_defs_ro.rb +14 -0
- data/test/defs/test_defs_southamerica.rb +23 -7
- data/test/defs/test_defs_tr.rb +7 -0
- data/test/defs/test_defs_us.rb +10 -10
- data/test/holidays/core_extensions/test_date.rb +3 -2
- data/test/holidays/definition/context/test_generator.rb +5 -18
- data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
- data/test/holidays/finder/rules/test_year_range.rb +43 -47
- data/test/integration/test_available_regions.rb +1 -1
- data/test/integration/test_custom_year_range_holidays.rb +0 -7
- data/test/integration/test_holidays.rb +3 -25
- data/test/integration/test_holidays_between.rb +10 -0
- data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
- metadata +28 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe8bda2ece3b3ebd51396c7e789afdc177973efecd1b4aa61f255e48c5b63030
|
4
|
+
data.tar.gz: 1124d98b145d9275c755a0e6b5a026602f7bdc017f966d097ad291383df4cc1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c26a9c82704f7b5feb34b93f882fe7ac42fafcad20e69afb4a2e36b39575db590e000f7a955545fb5e9232925132ab665b7aa9bc192cec86937c38f1e07e7bb9
|
7
|
+
data.tar.gz: b8e894ae48e9dbe1a6ee94d2a64de6f9f85ea524f0b0c39f2ac20b8aef59a63d620b9e2d24220352d364506c4a3348d849ffe907d45ef68384d80267adc71a12
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,44 @@
|
|
1
1
|
# Ruby Holidays Gem CHANGELOG
|
2
2
|
|
3
|
+
## 8.5.0
|
4
|
+
|
5
|
+
* Update submodule definitions.
|
6
|
+
* Thanks to contributors!!
|
7
|
+
|
8
|
+
## 8.4.1
|
9
|
+
|
10
|
+
* Fix jp holidays from 2022.
|
11
|
+
|
12
|
+
## 8.4.0
|
13
|
+
|
14
|
+
* Update submodule definitions.
|
15
|
+
* Thanks to contributors!!
|
16
|
+
|
17
|
+
|
18
|
+
## 8.3.0
|
19
|
+
|
20
|
+
* Update submodule definitions.
|
21
|
+
* Remove test about feb 29 on non leap year.
|
22
|
+
* Thanks to contributors!!
|
23
|
+
|
24
|
+
## 8.2.0
|
25
|
+
|
26
|
+
* Update submodule definitions. Thanks to contributors!!
|
27
|
+
|
28
|
+
## 8.1.0
|
29
|
+
|
30
|
+
* Update submodule definitions, so that the newest holidays from the definition
|
31
|
+
gem are represent here.
|
32
|
+
|
33
|
+
## 8.0.0
|
34
|
+
|
35
|
+
* Remove support for ruby 2.2 and ruby 2.3.
|
36
|
+
* Add support for latest ruby 2.6
|
37
|
+
* Update to [v5.0.1 definitions](https://github.com/holidays/definitions/releases/tag/v5.0.1). Please see the changelog for the definition details.
|
38
|
+
|
3
39
|
## 7.1.0
|
4
40
|
|
5
41
|
* Update to [v4.1.0 definitions](https://github.com/holidays/definitions/releases/tag/v4.1.0). Please see the changelog for the definition details.
|
6
|
-
* Add ruby 2.6 to automated tests
|
7
42
|
|
8
43
|
## 7.0.0
|
9
44
|
|
data/README.md
CHANGED
@@ -14,11 +14,10 @@ gem install holidays
|
|
14
14
|
|
15
15
|
This gem is tested with the following ruby versions:
|
16
16
|
|
17
|
-
* 2.2.9
|
18
|
-
* 2.3.8
|
19
17
|
* 2.4.5
|
20
18
|
* 2.5.3
|
21
|
-
*
|
19
|
+
* 2.6.1
|
20
|
+
* JRuby 9.2.5.0
|
22
21
|
|
23
22
|
## Semver
|
24
23
|
|
@@ -136,7 +135,7 @@ Get all observed US Federal holidays between 2018 and 2019:
|
|
136
135
|
from = Date.civil(2018,1,1)
|
137
136
|
to = Date.civil(2019,12,31)
|
138
137
|
|
139
|
-
Holidays.between(from, to, :
|
138
|
+
Holidays.between(from, to, :federalreserve, :observed)
|
140
139
|
=> [{:name => "New Year's Day"....}
|
141
140
|
{:name => "Birthday of Martin Luther King, Jr"....}]
|
142
141
|
```
|
data/doc/CONTRIBUTING.md
CHANGED
@@ -51,7 +51,7 @@ make point-to-defs-master
|
|
51
51
|
## For non-definition functionality
|
52
52
|
|
53
53
|
* Fork this repository
|
54
|
-
* Make your changes
|
54
|
+
* Make your changes. Don't forget to run `make test` to execute the test suite!
|
55
55
|
* Create a PR pointing back to `master`
|
56
56
|
|
57
57
|
Don't worry about versioning, we'll handle it on our end.
|
@@ -63,6 +63,7 @@ Don't worry about versioning, we'll handle it on our end.
|
|
63
63
|
We have included a few handy tasks to help you troubleshoot and test:
|
64
64
|
|
65
65
|
* `make test` - runs the entire suite
|
66
|
+
* `bundle exec ruby <test-file-to-run>` - runs just the tests in the specified file
|
66
67
|
* `REGION=<region> make test-region` - runs the tests for just that region
|
67
68
|
* `make console` - launches an IRB session with the 'holidays' gem loaded for quick testing
|
68
69
|
* `make update-defs` - runs the appropriate git submodule commands to pull the latest definitions
|
data/holidays.gemspec
CHANGED
@@ -16,11 +16,11 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.test_files = gem.files.grep(/^test/)
|
17
17
|
gem.require_paths = ['lib']
|
18
18
|
gem.licenses = ['MIT']
|
19
|
-
gem.required_ruby_version = '
|
20
|
-
gem.add_development_dependency 'bundler', '~>
|
19
|
+
gem.required_ruby_version = '>= 2.4'
|
20
|
+
gem.add_development_dependency 'bundler', '~> 2'
|
21
21
|
gem.add_development_dependency 'rake', '~> 12'
|
22
22
|
gem.add_development_dependency 'simplecov', '~> 0.16'
|
23
|
-
gem.add_development_dependency 'test-unit', '~> 3
|
24
|
-
gem.add_development_dependency 'mocha', '~> 1
|
25
|
-
gem.add_development_dependency 'pry', '~> 0.
|
23
|
+
gem.add_development_dependency 'test-unit', '~> 3'
|
24
|
+
gem.add_development_dependency 'mocha', '~> 1'
|
25
|
+
gem.add_development_dependency 'pry', '~> 0.12'
|
26
26
|
end
|
@@ -38,15 +38,18 @@ The following definition files are included in this installation:
|
|
38
38
|
* generated_definitions/it
|
39
39
|
* generated_definitions/jp
|
40
40
|
* generated_definitions/kr
|
41
|
+
* generated_definitions/kz
|
41
42
|
* generated_definitions/li
|
42
43
|
* generated_definitions/lt
|
43
44
|
* generated_definitions/lu
|
45
|
+
* generated_definitions/lv
|
44
46
|
* generated_definitions/ma
|
45
47
|
* generated_definitions/mt_en
|
46
48
|
* generated_definitions/mt_mt
|
47
49
|
* generated_definitions/mx
|
48
50
|
* generated_definitions/my
|
49
51
|
* generated_definitions/nerc
|
52
|
+
* generated_definitions/ng
|
50
53
|
* generated_definitions/nl
|
51
54
|
* generated_definitions/no
|
52
55
|
* generated_definitions/northamerica
|
@@ -1,6 +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, :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_nb, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :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, :co, :cr, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_be, :de_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :de_hb, :de_hh, :de_ni, :de_sh, :ecbtarget, :ee, :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, :federalreserve, :federalreservebanks, :fedex, :fi, :fr_a, :fr_m, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :gb_con, :im, :gb_iom, :ge, :hr, :hk, :hu, :ie, :is, :it, :kr, :li, :lt, :ma, :mt_mt, :mt_en, :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, :pt_li, :pt_po, :ro, :rs_cyrl, :rs_la, :ru, :se, :tn, :tr, :ua, :us_fl, :us_la, :us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn, :us_ms, :us_id, :us_ar, :us_tx, :us_dc, :us_md, :us_va, :
|
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_nb, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :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, :co, :cr, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_be, :de_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :de_hb, :de_hh, :de_ni, :de_sh, :ecbtarget, :ee, :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, :federalreserve, :federalreservebanks, :fedex, :fi, :fr_a, :fr_m, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :gb_con, :im, :gb_iom, :ge, :hr, :hk, :hu, :ie, :is, :it, :it_ve, :it_tv, :it_vr, :it_pd, :it_fi, :it_ge, :it_to, :it_rm, :it_vi, :it_bl, :it_ro, :kr, :kz, :li, :lt, :lv, :ma, :mt_mt, :mt_en, :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, :pt_li, :pt_po, :ro, :rs_cyrl, :rs_la, :ru, :se, :tn, :tr, :ua, :us_fl, :us_la, :us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn, :us_ms, :us_id, :us_ar, :us_tx, :us_dc, :us_md, :us_va, :us_vt, :us_ak, :us_ca, :us_me, :us_ma, :us_al, :us_ga, :us_ne, :us_mo, :us_sc, :us_wv, :us_vi, :us_ut, :us_ri, :us_az, :us_co, :us_il, :us_mt, :us_nm, :us_ny, :us_oh, :us_pa, :us_mi, :us_mn, :us_nv, :us_or, :us_sd, :us_wa, :us_wi, :us_wy, :us_ia, :us_ks, :us_nh, :us_ok, :unitednations, :ups, :za, :ve, :sk, :si, :jp, :vi, :sg, :my, :th, :ng]
|
4
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_nb=>:ca, :ca_mb=>:ca, :ca_ns=>:ca, :ca_pe=>:ca, :ca_nl=>:ca, :ca_nt=>:ca, :ca_nu=>:ca, :ca_yt=>:ca, :us=>:us, :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, :co=>:co, :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_cath=>:de, :de_sn=>:de, :de_st=>:de, :de_be=>:de, :de_by_cath=>:de, :de_by_augsburg=>:de, :de_bb=>:de, :de_mv=>:de, :de_th=>:de, :de_hb=>:de, :de_hh=>:de, :de_ni=>:de, :de_sh=>:de, :ecbtarget=>:ecbtarget, :ee=>:ee, :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, :federalreserve=>:federalreserve, :federalreservebanks=>:federalreservebanks, :fedex=>:fedex, :fi=>:fi, :fr_a=>:fr, :fr_m=>:fr, :fr=>:fr, :gb=>:gb, :gb_eng=>:gb, :gb_wls=>:gb, :gb_eaw=>:gb, :gb_nir=>:gb, :je=>:gb, :gb_jsy=>:gb, :gg=>:gb, :gb_gsy=>:gb, :gb_sct=>:gb, :gb_con=>:gb, :im=>:gb, :gb_iom=>:gb, :ge=>:ge, :hr=>:hr, :hk=>:hk, :hu=>:hu, :ie=>:ie, :is=>:is, :it=>:it, :kr=>:kr, :li=>:li, :lt=>:lt, :ma=>:ma, :mt_mt=>:mt_mt, :mt_en=>:mt_en, :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, :pt_li=>:pt, :pt_po=>:pt, :ro=>:ro, :rs_cyrl=>:rs_cyrl, :rs_la=>:rs_la, :ru=>:ru, :se=>:se, :tn=>:tn, :tr=>:tr, :ua=>:ua, :us_fl=>:us, :us_la=>:us, :us_ct=>:us, :us_de=>:us, :us_gu=>:us, :us_hi=>:us, :us_in=>:us, :us_ky=>:us, :us_nj=>:us, :us_nc=>:us, :us_nd=>:us, :us_pr=>:us, :us_tn=>:us, :us_ms=>:us, :us_id=>:us, :us_ar=>:us, :us_tx=>:us, :us_dc=>:us, :us_md=>:us, :us_va=>:us, :
|
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_nb=>:ca, :ca_mb=>:ca, :ca_ns=>:ca, :ca_pe=>:ca, :ca_nl=>:ca, :ca_nt=>:ca, :ca_nu=>:ca, :ca_yt=>:ca, :us=>:us, :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, :co=>:co, :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_cath=>:de, :de_sn=>:de, :de_st=>:de, :de_be=>:de, :de_by_cath=>:de, :de_by_augsburg=>:de, :de_bb=>:de, :de_mv=>:de, :de_th=>:de, :de_hb=>:de, :de_hh=>:de, :de_ni=>:de, :de_sh=>:de, :ecbtarget=>:ecbtarget, :ee=>:ee, :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, :federalreserve=>:federalreserve, :federalreservebanks=>:federalreservebanks, :fedex=>:fedex, :fi=>:fi, :fr_a=>:fr, :fr_m=>:fr, :fr=>:fr, :gb=>:gb, :gb_eng=>:gb, :gb_wls=>:gb, :gb_eaw=>:gb, :gb_nir=>:gb, :je=>:gb, :gb_jsy=>:gb, :gg=>:gb, :gb_gsy=>:gb, :gb_sct=>:gb, :gb_con=>:gb, :im=>:gb, :gb_iom=>:gb, :ge=>:ge, :hr=>:hr, :hk=>:hk, :hu=>:hu, :ie=>:ie, :is=>:is, :it=>:it, :it_ve=>:it, :it_tv=>:it, :it_vr=>:it, :it_pd=>:it, :it_fi=>:it, :it_ge=>:it, :it_to=>:it, :it_rm=>:it, :it_vi=>:it, :it_bl=>:it, :it_ro=>:it, :kr=>:kr, :kz=>:kz, :li=>:li, :lt=>:lt, :lv=>:lv, :ma=>:ma, :mt_mt=>:mt_mt, :mt_en=>:mt_en, :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, :pt_li=>:pt, :pt_po=>:pt, :ro=>:ro, :rs_cyrl=>:rs_cyrl, :rs_la=>:rs_la, :ru=>:ru, :se=>:se, :tn=>:tn, :tr=>:tr, :ua=>:ua, :us_fl=>:us, :us_la=>:us, :us_ct=>:us, :us_de=>:us, :us_gu=>:us, :us_hi=>:us, :us_in=>:us, :us_ky=>:us, :us_nj=>:us, :us_nc=>:us, :us_nd=>:us, :us_pr=>:us, :us_tn=>:us, :us_ms=>:us, :us_id=>:us, :us_ar=>:us, :us_tx=>:us, :us_dc=>:us, :us_md=>:us, :us_va=>:us, :us_vt=>:us, :us_ak=>:us, :us_ca=>:us, :us_me=>:us, :us_ma=>:us, :us_al=>:us, :us_ga=>:us, :us_ne=>:us, :us_mo=>:us, :us_sc=>:us, :us_wv=>:us, :us_vi=>:us, :us_ut=>:us, :us_ri=>:us, :us_az=>:us, :us_co=>:us, :us_il=>:us, :us_mt=>:us, :us_nm=>:us, :us_ny=>:us, :us_oh=>:us, :us_pa=>:us, :us_mi=>:us, :us_mn=>:us, :us_nv=>:us, :us_or=>:us, :us_sd=>:us, :us_wa=>:us, :us_wi=>:us, :us_wy=>:us, :us_ia=>:us, :us_ks=>:us, :us_nh=>:us, :us_ok=>:us, :unitednations=>:unitednations, :ups=>:ups, :za=>:za, :ve=>:southamerica, :sk=>:europe, :si=>:europe, :jp=>:jp, :vi=>:vi, :sg=>:sg, :my=>:my, :th=>:th, :ng=>:ng}
|
6
6
|
end
|
@@ -19,22 +19,41 @@ module Holidays
|
|
19
19
|
3 => [{:mday => 24, :name => "Día Nacional de la Memoria por la Verdad y la Justicia", :regions => [:ar]}],
|
20
20
|
4 => [{:mday => 2, :name => "Día del Veterano y de los Caídos en la Guerra de Malvinas", :regions => [:ar]}],
|
21
21
|
5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:ar]},
|
22
|
-
{:mday => 25, :name => "Día de la Revolución de Mayo", :regions => [:ar]}
|
23
|
-
|
24
|
-
|
22
|
+
{:mday => 25, :name => "Día de la Revolución de Mayo", :regions => [:ar]},
|
23
|
+
{:mday => 24, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
|
24
|
+
6 => [{:mday => 17, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Paso a la Inmortalidad del General Martín Miguel de Güemes", :regions => [:ar]},
|
25
|
+
{:mday => 20, :name => "Día de la Bandera", :regions => [:ar]}],
|
26
|
+
7 => [{:mday => 8, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
|
25
27
|
{:mday => 9, :name => "Día de la Independencia", :regions => [:ar]}],
|
26
|
-
8 => [{:mday =>
|
27
|
-
10 => [{:mday => 12, :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]}
|
28
|
-
|
28
|
+
8 => [{:mday => 17, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]}],
|
29
|
+
10 => [{:mday => 12, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
|
30
|
+
{:mday => 8, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
|
31
|
+
11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]},
|
32
|
+
{:mday => 22, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
|
29
33
|
12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:ar]},
|
30
|
-
{:mday => 9, :name => "Feriado
|
34
|
+
{:mday => 9, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
|
31
35
|
{:mday => 25, :name => "Navidad", :regions => [:ar]}]
|
32
36
|
}
|
33
37
|
end
|
34
38
|
|
35
39
|
def self.custom_methods
|
36
40
|
{
|
37
|
-
|
41
|
+
"to_nearest_monday(date)" => Proc.new { |date|
|
42
|
+
case date.wday
|
43
|
+
when 5
|
44
|
+
date += 3
|
45
|
+
when 4
|
46
|
+
date += 4
|
47
|
+
when 3
|
48
|
+
date -= 2
|
49
|
+
when 2
|
50
|
+
date -= 1
|
51
|
+
end
|
52
|
+
|
53
|
+
date
|
54
|
+
},
|
55
|
+
|
56
|
+
|
38
57
|
}
|
39
58
|
end
|
40
59
|
end
|
@@ -15,7 +15,7 @@ module Holidays
|
|
15
15
|
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:au]},
|
16
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]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:au_nsw, :au_vic]},
|
18
|
-
{:function => "easter(year)", :function_arguments => [:year],
|
18
|
+
{:function => "easter(year)", :function_arguments => [:year], :year_ranges => { :from => 2017 },:name => "Easter Sunday", :regions => [:au_qld, :au_act]},
|
19
19
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:au]}],
|
20
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
21
|
{:mday => 1, :function => "to_monday_if_weekend(date)", :function_arguments => [:date], :name => "New Year's Day", :regions => [:au_tas]},
|
@@ -26,13 +26,13 @@ module Holidays
|
|
26
26
|
{:wday => 1, :week => 2, :name => "Labour Day", :regions => [:au_vic]},
|
27
27
|
{:function => "march_pub_hol_sa(year)", :function_arguments => [:year], :name => "March Public Holiday", :regions => [:au_sa]},
|
28
28
|
{:wday => 1, :week => 2, :name => "Canberra Day", :regions => [:au_act]}],
|
29
|
-
4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au]},
|
30
|
-
{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "ANZAC Day", :regions => [:au_nsw, :
|
29
|
+
4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au, :au_vic]},
|
30
|
+
{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "ANZAC Day", :regions => [:au_nsw, :au_qld, :au_nt, :au_act, :au_sa, :au_tas]},
|
31
31
|
{:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "ANZAC Day", :regions => [:au_wa]}],
|
32
32
|
5 => [{:function => "qld_labour_day_may(year)", :function_arguments => [:year], :name => "Labour Day", :regions => [:au_qld]},
|
33
33
|
{:wday => 1, :week => 1, :name => "May Day", :regions => [:au_nt]},
|
34
34
|
{:function => "may_pub_hol_sa(year)", :function_arguments => [:year], :name => "May Public Holiday", :regions => [:au_sa]}],
|
35
|
-
6 => [{:wday => 1, :week => 1, :name => "
|
35
|
+
6 => [{:wday => 1, :week => 1, :name => "Western Australia Day", :regions => [:au_wa]},
|
36
36
|
{:wday => 1, :week => 2, :name => "Queen's Birthday", :regions => [:au_act, :au_nsw, :au_sa, :au_tas, :au_nt, :au_vic]},
|
37
37
|
{:function => "qld_queens_birthday_june(year)", :function_arguments => [:year], :name => "Queen's Birthday", :regions => [:au_qld]},
|
38
38
|
{:mday => 6, :type => :informal, :name => "Queensland Day", :regions => [:au_qld]}],
|
@@ -66,6 +66,12 @@ when 2016
|
|
66
66
|
Date.civil(2016, 9, 30)
|
67
67
|
when 2017
|
68
68
|
Date.civil(2017, 9, 29)
|
69
|
+
when 2018
|
70
|
+
Date.civil(2018, 9, 28)
|
71
|
+
when 2019
|
72
|
+
Date.civil(2019,9, 27)
|
73
|
+
when 2020
|
74
|
+
Date.civil(2020, 10, 23)
|
69
75
|
end
|
70
76
|
},
|
71
77
|
|
@@ -17,18 +17,19 @@ module Holidays
|
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :type => :informal, :name => "Easter Monday", :regions => [:ca]}],
|
18
18
|
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:ca]},
|
19
19
|
{:mday => 2, :name => "New Year's", :regions => [:ca_qc]}],
|
20
|
-
2 => [{:wday => 1, :week => 3,
|
21
|
-
{:wday => 1, :week => 3,
|
22
|
-
{:wday => 1, :week => 3,
|
23
|
-
{:wday => 1, :week => 2,
|
24
|
-
{:wday => 1, :week => 3,
|
25
|
-
{:wday => 1, :week => 3,
|
20
|
+
2 => [{:wday => 1, :week => 3, :year_ranges => { :from => 1990 },:name => "Family Day", :regions => [:ca_ab]},
|
21
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2007 },:name => "Family Day", :regions => [:ca_sk]},
|
22
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2008 },:name => "Family Day", :regions => [:ca_on]},
|
23
|
+
{:wday => 1, :week => 2, :year_ranges => { :between => 2013..2018 },:name => "Family Day", :regions => [:ca_bc]},
|
24
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2019 },:name => "Family Day", :regions => [:ca_bc]},
|
25
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2018 },:name => "Family Day", :regions => [:ca_nb]},
|
26
26
|
{:wday => 1, :week => 3, :name => "Louis Riel Day", :regions => [:ca_mb]},
|
27
|
-
{:wday => 1, :week => 3,
|
27
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2015 },:name => "Nova Scotia Heritage Day", :regions => [:ca_ns]},
|
28
28
|
{:wday => 1, :week => 3, :name => "Islander Day", :regions => [:ca_pe]},
|
29
29
|
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
30
30
|
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
31
|
-
3 => [{:mday =>
|
31
|
+
3 => [{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:ca_nl]},
|
32
|
+
{:mday => 23, :type => :informal, :name => "St. George's Day", :regions => [:ca_nl]},
|
32
33
|
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
33
34
|
5 => [{:function => "ca_victoria_day(year)", :function_arguments => [:year], :name => "Victoria Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nt, :ca_nu, :ca_on, :ca_sk, :ca_yt]},
|
34
35
|
{:function => "ca_victoria_day(year)", :function_arguments => [:year], :name => "National Patriotes Day", :regions => [:ca_qc]},
|
@@ -37,11 +38,11 @@ module Holidays
|
|
37
38
|
6 => [{:mday => 24, :type => :informal, :name => "Discovery Day", :regions => [:ca_nl]},
|
38
39
|
{:mday => 24, :name => "Fête Nationale", :regions => [:ca_qc]},
|
39
40
|
{:mday => 21, :name => "National Aboriginal Day", :regions => [:ca_nt]},
|
40
|
-
{:mday => 21,
|
41
|
+
{:mday => 21, :year_ranges => { :from => 2017 },:name => "National Aboriginal Day", :regions => [:ca_yt]},
|
41
42
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
42
43
|
7 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Canada Day", :regions => [:ca]},
|
43
44
|
{:mday => 12, :type => :informal, :name => "Orangemen's Day", :regions => [:ca_nl]},
|
44
|
-
{:mday => 9, :name => "Nunavut Day", :regions => [:ca_nu]}],
|
45
|
+
{:mday => 9, :year_ranges => { :from => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Nunavut Day", :regions => [:ca_nu]}],
|
45
46
|
8 => [{:wday => 1, :week => 1, :name => "B.C. Day", :regions => [:ca_bc]},
|
46
47
|
{:wday => 1, :week => 1, :name => "Saskatchewan Day", :regions => [:ca_sk]},
|
47
48
|
{:wday => 1, :week => 1, :type => :informal, :name => "Heritage Day", :regions => [:ca_ab]},
|
@@ -49,15 +50,19 @@ module Holidays
|
|
49
50
|
{:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_nt, :ca_nu]},
|
50
51
|
{:wday => 1, :week => 1, :type => :informal, :name => "Civic Holiday", :regions => [:ca_on, :ca_pe]},
|
51
52
|
{:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
|
52
|
-
{:wday => 1, :week => 1, :name => "Terry Fox Day", :regions => [:ca_mb]},
|
53
|
+
{:wday => 1, :week => 1, :type => :informal, :name => "Terry Fox Day", :regions => [:ca_mb]},
|
53
54
|
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]}],
|
54
|
-
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]}
|
55
|
-
|
55
|
+
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
|
56
|
+
{:mday => 30, :year_ranges => { :from => 2021 },:name => "National Day for Truth and Reconciliation", :regions => [:ca]}],
|
57
|
+
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nt, :ca_nu, :ca_on, :ca_qc, :ca_sk, :ca_yt]},
|
56
58
|
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
|
57
59
|
11 => [{:mday => 11, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Remembrance Day", :regions => [:ca_ab, :ca_sk, :ca_bc, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_nb, :ca_yt]}],
|
58
|
-
12 => [{:mday => 25, :observed => "
|
59
|
-
{:mday =>
|
60
|
-
{:mday =>
|
60
|
+
12 => [{:mday => 25, :year_ranges => { :until => 2020 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
|
61
|
+
{:mday => 25, :year_ranges => { :from => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
|
62
|
+
{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt]},
|
63
|
+
{:mday => 26, :year_ranges => { :until => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
|
64
|
+
{:mday => 26, :year_ranges => { :from => 2020 },:observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
|
65
|
+
{:mday => 26, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "Boxing Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt]}],
|
61
66
|
4 => [{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
62
67
|
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}]
|
63
68
|
}
|
@@ -32,7 +32,8 @@ module Holidays
|
|
32
32
|
{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_ag, :ch_ti, :ch_vs, :ch_ju]}],
|
33
33
|
9 => [{:mday => 22, :name => "Mauritiustag", :regions => [:ch_ai]},
|
34
34
|
{:mday => 25, :name => "Bruderklausenfest", :regions => [:ch_ow]}],
|
35
|
-
11 => [{:
|
35
|
+
11 => [{:function => "ch_be_zibelemaerit(year)", :function_arguments => [:year], :name => "Zibelemärit", :regions => [:ch_be]},
|
36
|
+
{:mday => 1, :name => "Allerheiligen", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_sg, :ch_ag, :ch_ti, :ch_vs, :ch_ju]}],
|
36
37
|
12 => [{:mday => 8, :name => "Maria Empfängnis", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_zg, :ch_fr, :ch_ai, :ch_ag, :ch_ti, :ch_vs]},
|
37
38
|
{:mday => 25, :name => "Weihnachten", :regions => [:ch]},
|
38
39
|
{:mday => 26, :name => "Stefanstag", :regions => [: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_vs, :ch_ne]},
|
@@ -76,6 +77,17 @@ end
|
|
76
77
|
date
|
77
78
|
},
|
78
79
|
|
80
|
+
"ch_be_zibelemaerit(year)" => Proc.new { |year|
|
81
|
+
date = Date.civil(year,11,1)
|
82
|
+
# Find the first Monday of November
|
83
|
+
until date.wday.eql? 1 do
|
84
|
+
date += 1
|
85
|
+
end
|
86
|
+
# There are 21 days between the first monday
|
87
|
+
# and the 4rth Monday after
|
88
|
+
date + 21
|
89
|
+
},
|
90
|
+
|
79
91
|
|
80
92
|
}
|
81
93
|
end
|
@@ -14,18 +14,18 @@ module Holidays
|
|
14
14
|
{
|
15
15
|
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:cl]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Sábado Santo", :regions => [:cl]},
|
17
|
-
{:function => "st_peter_st_paul_cl(year)", :function_arguments => [:year],
|
18
|
-
{:function => "other_churches_day_cl(year)", :function_arguments => [:year],
|
17
|
+
{:function => "st_peter_st_paul_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "San Pedro y San Pablo", :regions => [:cl]},
|
18
|
+
{:function => "other_churches_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2008 },:name => "Día de las Iglesias Evangélicas y Protestantes", :regions => [:cl]}],
|
19
19
|
1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:cl]}],
|
20
20
|
5 => [{:mday => 1, :name => "Día del Trabajo", :regions => [:cl]},
|
21
21
|
{:mday => 21, :name => "Día de las Glorias Navales", :regions => [:cl]}],
|
22
|
-
6 => [{:mday => 29,
|
22
|
+
6 => [{:mday => 29, :year_ranges => { :until => 1999 },:name => "San Pedro y San Pablo", :regions => [:cl]}],
|
23
23
|
7 => [{:mday => 16, :name => "Día de la Virgen del Carmen", :regions => [:cl]}],
|
24
24
|
8 => [{:mday => 15, :name => "Asunción de la Virgen", :regions => [:cl]}],
|
25
25
|
9 => [{:mday => 18, :name => "Independencia Nacional", :regions => [:cl]},
|
26
26
|
{:mday => 19, :name => "Día de las Glorias del Ejército", :regions => [:cl]}],
|
27
|
-
10 => [{:mday => 12,
|
28
|
-
{:function => "columbus_day_cl(year)", :function_arguments => [:year],
|
27
|
+
10 => [{:mday => 12, :year_ranges => { :until => 1999 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
|
28
|
+
{:function => "columbus_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "Encuentro de Dos Mundos", :regions => [:cl]}],
|
29
29
|
11 => [{:mday => 1, :name => "Día de Todos los Santos", :regions => [:cl]}],
|
30
30
|
12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:cl]},
|
31
31
|
{:mday => 25, :name => "Navidad", :regions => [:cl]}]
|
@@ -24,15 +24,16 @@ module Holidays
|
|
24
24
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -46, :type => :informal, :name => "Aschermittwoch", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]}],
|
25
25
|
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:de]},
|
26
26
|
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]}],
|
27
|
-
3 => [{:mday => 8,
|
28
|
-
5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]}
|
27
|
+
3 => [{:mday => 8, :year_ranges => { :from => 2019 },:name => "Internationaler Frauentag", :regions => [:de_be]}],
|
28
|
+
5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
|
29
|
+
{:mday => 8, :year_ranges => { :limited => [2020] },:name => "Tag der Befreiung", :regions => [:de_be]}],
|
29
30
|
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by_cath, :de_by_augsburg, :de_sl]},
|
30
31
|
{:mday => 8, :name => "Friedensfest", :regions => [:de_by_augsburg]}],
|
31
32
|
10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
32
33
|
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
|
33
34
|
{:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
|
34
|
-
{:mday => 31,
|
35
|
-
{:mday => 31,
|
35
|
+
{:mday => 31, :year_ranges => { :limited => [2017] },:name => "Reformationstag", :regions => [:de]},
|
36
|
+
{:mday => 31, :year_ranges => { :from => 2018 },:name => "Reformationstag", :regions => [:de_hb, :de_hh, :de_ni, :de_sh]}],
|
36
37
|
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
|
37
38
|
{:function => "de_buss_und_bettag(year)", :function_arguments => [:year], :name => "Buß- und Bettag", :regions => [:de_sn]}],
|
38
39
|
12 => [{:mday => 24, :type => :informal, :name => "Heilig Abend", :regions => [:de]},
|
@@ -14,7 +14,8 @@ module Holidays
|
|
14
14
|
{
|
15
15
|
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [: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]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:es]},
|
17
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}
|
17
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
|
18
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lunes de Pascua Granada", :regions => [:es_ct]}],
|
18
19
|
1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Año Nuevo", :regions => [:es]},
|
19
20
|
{:mday => 6, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Reyes", :regions => [:es]}],
|
20
21
|
2 => [{:mday => 28, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Andalucía", :regions => [:es_an]}],
|
@@ -27,7 +28,8 @@ module Holidays
|
|
27
28
|
{:mday => 30, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de las Canarias", :regions => [:es_cn]},
|
28
29
|
{:mday => 31, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
|
29
30
|
6 => [{:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Región de Murcia", :regions => [:es_mu]},
|
30
|
-
{:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]}
|
31
|
+
{:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]},
|
32
|
+
{:mday => 24, :name => "San Juan", :regions => [:es_ct, :es_vc]}],
|
31
33
|
7 => [{:mday => 23, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Santiago Apostol", :regions => [:es_ga]}],
|
32
34
|
8 => [{:mday => 15, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Asunción", :regions => [:es]}],
|
33
35
|
9 => [{:mday => 2, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Ceuta", :regions => [:es_ce]},
|