holidays 8.2.0 → 8.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/holidays.gemspec +1 -1
  4. data/lib/generated_definitions/MANIFEST +1 -0
  5. data/lib/generated_definitions/REGIONS.rb +2 -2
  6. data/lib/generated_definitions/ar.rb +27 -8
  7. data/lib/generated_definitions/au.rb +9 -3
  8. data/lib/generated_definitions/ca.rb +9 -5
  9. data/lib/generated_definitions/ch.rb +13 -1
  10. data/lib/generated_definitions/es.rb +2 -1
  11. data/lib/generated_definitions/europe.rb +20 -4
  12. data/lib/generated_definitions/federalreservebanks.rb +1 -0
  13. data/lib/generated_definitions/gb.rb +5 -2
  14. data/lib/generated_definitions/hr.rb +2 -2
  15. data/lib/generated_definitions/jp.rb +9 -4
  16. data/lib/generated_definitions/kz.rb +38 -0
  17. data/lib/generated_definitions/northamerica.rb +9 -4
  18. data/lib/generated_definitions/southamerica.rb +25 -6
  19. data/lib/generated_definitions/us.rb +1 -0
  20. data/lib/generated_definitions/za.rb +1 -1
  21. data/lib/holidays/version.rb +1 -1
  22. data/test/defs/test_defs_ar.rb +20 -4
  23. data/test/defs/test_defs_au.rb +2 -0
  24. data/test/defs/test_defs_ca.rb +26 -15
  25. data/test/defs/test_defs_ch.rb +4 -0
  26. data/test/defs/test_defs_es.rb +2 -0
  27. data/test/defs/test_defs_europe.rb +30 -0
  28. data/test/defs/test_defs_federalreservebanks.rb +4 -0
  29. data/test/defs/test_defs_gb.rb +24 -0
  30. data/test/defs/test_defs_jp.rb +5 -3
  31. data/test/defs/test_defs_kz.rb +39 -0
  32. data/test/defs/test_defs_northamerica.rb +30 -15
  33. data/test/defs/test_defs_southamerica.rb +20 -4
  34. data/test/defs/test_defs_us.rb +4 -0
  35. data/test/integration/test_available_regions.rb +1 -1
  36. data/test/integration/test_holidays.rb +3 -25
  37. metadata +7 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26ed11c6f2462ac549c33067daacbb82781324b4c1637ea796c88048bc72faed
4
- data.tar.gz: d10b5f27dc975dc3a21739cc0c3e0299de4064eb6be5389a6f3a865dd2c78f9c
3
+ metadata.gz: fe8bda2ece3b3ebd51396c7e789afdc177973efecd1b4aa61f255e48c5b63030
4
+ data.tar.gz: 1124d98b145d9275c755a0e6b5a026602f7bdc017f966d097ad291383df4cc1b
5
5
  SHA512:
6
- metadata.gz: 0e4089d0da9c918ee765b2674bf9399ce28abff83f7e50ab4b308169fd1c602b691c7b71a3fe63e70fe9d280f6c400cc0aa6b1298a08e9339288e17af7b790ec
7
- data.tar.gz: f7908de1a81251eedf4d91be236fd7fb62c2267e728df0a8ebee1c38f8441d378476ca401edde77bae29a80d6a72217cf6f0441afd66ed5d8d151e6ae00fc8ba
6
+ metadata.gz: c26a9c82704f7b5feb34b93f882fe7ac42fafcad20e69afb4a2e36b39575db590e000f7a955545fb5e9232925132ab665b7aa9bc192cec86937c38f1e07e7bb9
7
+ data.tar.gz: b8e894ae48e9dbe1a6ee94d2a64de6f9f85ea524f0b0c39f2ac20b8aef59a63d620b9e2d24220352d364506c4a3348d849ffe907d45ef68384d80267adc71a12
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
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
+
3
24
  ## 8.2.0
4
25
 
5
26
  * Update submodule definitions. Thanks to contributors!!
data/holidays.gemspec CHANGED
@@ -16,7 +16,7 @@ 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 = '~> 2.4'
19
+ gem.required_ruby_version = '>= 2.4'
20
20
  gem.add_development_dependency 'bundler', '~> 2'
21
21
  gem.add_development_dependency 'rake', '~> 12'
22
22
  gem.add_development_dependency 'simplecov', '~> 0.16'
@@ -38,6 +38,7 @@ 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
@@ -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, :it_ve, :it_tv, :it_vr, :it_pd, :it_fi, :it_ge, :it_to, :it_rm, :it_vi, :it_bl, :it_ro, :kr, :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]
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, :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, :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}
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
- 6 => [{:mday => 20, :name => "Día de la Bandera", :regions => [:ar]}],
24
- 7 => [{:mday => 8, :name => "Feriado puente turístico", :regions => [:ar]},
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 => 15, :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]}],
27
- 10 => [{:mday => 12, :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]}],
28
- 11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]}],
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 puente turístico", :regions => [:ar]},
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
@@ -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, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_tas]},
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 => "Foundation Day", :regions => [:au_wa]},
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
 
@@ -50,15 +50,19 @@ module Holidays
50
50
  {:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_nt, :ca_nu]},
51
51
  {:wday => 1, :week => 1, :type => :informal, :name => "Civic Holiday", :regions => [:ca_on, :ca_pe]},
52
52
  {:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
53
- {: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]},
54
54
  {:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]}],
55
- 9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]}],
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]}],
56
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]},
57
58
  {:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
58
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]}],
59
- 12 => [{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca]},
60
- {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
61
- {:mday => 26, :observed => "to_weekday_if_boxing_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_sk, :ca_yt]}],
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]}],
62
66
  4 => [{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
63
67
  {:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}]
64
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 => [{: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]}],
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,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]}],
@@ -64,6 +64,7 @@ module Holidays
64
64
  {: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]},
65
65
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:es]},
66
66
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
67
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lunes de Pascua Granada", :regions => [:es_ct]},
67
68
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Vendredi saint", :regions => [:fr_a, :fr_m]},
68
69
  {:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pâques", :regions => [:fr]},
69
70
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lundi de Pâques", :regions => [:fr]},
@@ -226,7 +227,8 @@ module Holidays
226
227
  {:mday => 8, :year_ranges => { :limited => [2020] },:name => "May Day", :regions => [:gb]},
227
228
  {:wday => 1, :week => 1, :year_ranges => { :from => 2021 },:name => "May Day", :regions => [:gb]},
228
229
  {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
229
- {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]},
230
+ {:wday => 1, :week => -1, :year_ranges => { :until => 2021 },:name => "Bank Holiday", :regions => [:gb]},
231
+ {:wday => 1, :week => -1, :year_ranges => { :from => 2023 },:name => "Bank Holiday", :regions => [:gb]},
230
232
  {:mday => 1, :name => "Praznik rada", :regions => [:hr]},
231
233
  {:mday => 30, :year_ranges => { :from => 2020 },:name => "Dan državnosti", :regions => [:hr]},
232
234
  {:mday => 1, :name => "A munka ünnepe", :regions => [:hu]},
@@ -299,7 +301,7 @@ module Holidays
299
301
  {:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]},
300
302
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
301
303
  {:mday => 12, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Hispanidad", :regions => [:es]},
302
- {:mday => 8, :year_ranges => { :until => 2020 },:name => "Dan neovisnosti", :regions => [:hr]},
304
+ {:mday => 8, :year_ranges => { :until => 2019 },:name => "Dan neovisnosti", :regions => [:hr]},
303
305
  {:mday => 23, :name => "1956-os forradalom és szabadságharc ünnepe", :regions => [:hu]},
304
306
  {:wday => 1, :week => -1, :name => "October Bank Holiday", :regions => [:ie]},
305
307
  {:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]},
@@ -311,6 +313,7 @@ module Holidays
311
313
  {:mday => 11, :name => "Armistice 1918", :regions => [:be_fr]},
312
314
  {:mday => 1, :name => "Allerheiligen", :regions => [:be_nl]},
313
315
  {:mday => 11, :name => "Wapenstilstand 1918", :regions => [:be_nl]},
316
+ {:function => "ch_be_zibelemaerit(year)", :function_arguments => [:year], :name => "Zibelemärit", :regions => [:ch_be]},
314
317
  {: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]},
315
318
  {:mday => 17, :name => "Den boje za svobodu a demokracii", :regions => [:cz]},
316
319
  {:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
@@ -436,7 +439,7 @@ module Holidays
436
439
  {:mday => 23, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Santiago Apostol", :regions => [:es_ga]},
437
440
  {:mday => 14, :name => "Fête nationale", :regions => [:fr]},
438
441
  {:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
439
- {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]},
442
+ {:mday => 12, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Battle of the Boyne", :regions => [:gb_nir]},
440
443
  {:mday => 6, :name => "Valstybės diena", :regions => [:lt]},
441
444
  {:mday => 5, :name => "Sviatok svätého Cyrila a svätého Metoda", :regions => [:sk]},
442
445
  {:mday => 16, :year_ranges => { :limited => [1991] },:name => "День Незалежності України", :regions => [:ua]}],
@@ -480,8 +483,10 @@ module Holidays
480
483
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Región de Murcia", :regions => [:es_mu]},
481
484
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]},
482
485
  {:mday => 24, :name => "San Juan", :regions => [:es_ct, :es_vc]},
486
+ {:mday => 2, :year_ranges => { :limited => [2022] },:name => "Bank Holiday", :regions => [:gb]},
487
+ {:mday => 3, :year_ranges => { :limited => [2022] },:name => "Platinum Jubilee", :regions => [:gb]},
483
488
  {:mday => 22, :name => "Dan antifašističke borbe", :regions => [:hr]},
484
- {:mday => 25, :year_ranges => { :until => 2020 },:name => "Dan državnosti", :regions => [:hr]},
489
+ {:mday => 25, :year_ranges => { :until => 2019 },:name => "Dan državnosti", :regions => [:hr]},
485
490
  {:wday => 1, :week => 1, :name => "June Bank Holiday", :regions => [:ie]},
486
491
  {:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
487
492
  {:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
@@ -563,6 +568,17 @@ end
563
568
  date
564
569
  },
565
570
 
571
+ "ch_be_zibelemaerit(year)" => Proc.new { |year|
572
+ date = Date.civil(year,11,1)
573
+ # Find the first Monday of November
574
+ until date.wday.eql? 1 do
575
+ date += 1
576
+ end
577
+ # There are 21 days between the first monday
578
+ # and the 4rth Monday after
579
+ date + 21
580
+ },
581
+
566
582
  "de_buss_und_bettag(year)" => Proc.new { |year|
567
583
  date = Date.civil(year,11,23)
568
584
  if date.wday > 3
@@ -16,6 +16,7 @@ module Holidays
16
16
  {:wday => 1, :week => 3, :name => "Birthday of Martin Luther King, Jr", :regions => [:federalreservebanks]}],
17
17
  2 => [{:wday => 1, :week => 3, :name => "Washington's Birthday", :regions => [:federalreservebanks]}],
18
18
  5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:federalreservebanks]}],
19
+ 6 => [{:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:federalreservebanks]}],
19
20
  7 => [{:mday => 4, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federalreservebanks]}],
20
21
  9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:federalreservebanks]}],
21
22
  10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:federalreservebanks]}],
@@ -23,9 +23,12 @@ module Holidays
23
23
  {:mday => 8, :year_ranges => { :limited => [2020] },:name => "May Day", :regions => [:gb]},
24
24
  {:wday => 1, :week => 1, :year_ranges => { :from => 2021 },:name => "May Day", :regions => [:gb]},
25
25
  {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
26
- {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]}],
26
+ {:wday => 1, :week => -1, :year_ranges => { :until => 2021 },:name => "Bank Holiday", :regions => [:gb]},
27
+ {:wday => 1, :week => -1, :year_ranges => { :from => 2023 },:name => "Bank Holiday", :regions => [:gb]}],
28
+ 6 => [{:mday => 2, :year_ranges => { :limited => [2022] },:name => "Bank Holiday", :regions => [:gb]},
29
+ {:mday => 3, :year_ranges => { :limited => [2022] },:name => "Platinum Jubilee", :regions => [:gb]}],
27
30
  7 => [{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
28
- {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
31
+ {:mday => 12, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Battle of the Boyne", :regions => [:gb_nir]}],
29
32
  8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
30
33
  {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy]}],
31
34
  11 => [{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
@@ -20,10 +20,10 @@ module Holidays
20
20
  5 => [{:mday => 1, :name => "Praznik rada", :regions => [:hr]},
21
21
  {:mday => 30, :year_ranges => { :from => 2020 },:name => "Dan državnosti", :regions => [:hr]}],
22
22
  6 => [{:mday => 22, :name => "Dan antifašističke borbe", :regions => [:hr]},
23
- {:mday => 25, :year_ranges => { :until => 2020 },:name => "Dan državnosti", :regions => [:hr]}],
23
+ {:mday => 25, :year_ranges => { :until => 2019 },:name => "Dan državnosti", :regions => [:hr]}],
24
24
  8 => [{:mday => 5, :name => "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", :regions => [:hr]},
25
25
  {:mday => 15, :name => "Velika Gospa", :regions => [:hr]}],
26
- 10 => [{:mday => 8, :year_ranges => { :until => 2020 },:name => "Dan neovisnosti", :regions => [:hr]}],
26
+ 10 => [{:mday => 8, :year_ranges => { :until => 2019 },:name => "Dan neovisnosti", :regions => [:hr]}],
27
27
  11 => [{:mday => 1, :name => "Svi sveti", :regions => [:hr]},
28
28
  {:mday => 18, :year_ranges => { :from => 2020 },:name => "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje", :regions => [:hr]}],
29
29
  12 => [{:mday => 25, :name => "Božić", :regions => [:hr]},
@@ -35,20 +35,25 @@ module Holidays
35
35
  7 => [{:mday => 20, :year_ranges => { :between => 1996..2002 },:name => "海の日", :regions => [:jp]},
36
36
  {:wday => 1, :week => 3, :year_ranges => { :between => 2003..2019 },:name => "海の日", :regions => [:jp]},
37
37
  {:mday => 23, :year_ranges => { :limited => [2020] },:name => "海の日", :regions => [:jp]},
38
- {:wday => 1, :week => 3, :year_ranges => { :from => 2021 },:name => "海の日", :regions => [:jp]},
38
+ {:mday => 22, :year_ranges => { :limited => [2021] },:name => "海の日", :regions => [:jp]},
39
+ {:wday => 1, :week => 3, :year_ranges => { :from => 2022 },:name => "海の日", :regions => [:jp]},
39
40
  {:function => "jp_marine_day_substitute(year)", :function_arguments => [:year], :year_ranges => { :between => 1996..2002 },:name => "振替休日", :regions => [:jp]},
41
+ {:mday => 23, :year_ranges => { :limited => [2021] },:name => "スポーツの日", :regions => [:jp]},
40
42
  {:mday => 24, :year_ranges => { :limited => [2020] },:name => "スポーツの日", :regions => [:jp]}],
41
43
  8 => [{:function => "jp_mountain_holiday(year)", :function_arguments => [:year], :year_ranges => { :between => 2016..2019 },:name => "山の日", :regions => [:jp]},
42
44
  {:mday => 10, :year_ranges => { :limited => [2020] },:name => "山の日", :regions => [:jp]},
43
- {:function => "jp_mountain_holiday(year)", :function_arguments => [:year], :year_ranges => { :from => 2021 },:name => "山の日", :regions => [:jp]},
44
- {:function => "jp_mountain_holiday_substitute(year)", :function_arguments => [:year], :year_ranges => { :from => 2016 },:name => "振替休日", :regions => [:jp]}],
45
+ {:mday => 8, :year_ranges => { :limited => [2021] },:name => "山の日", :regions => [:jp]},
46
+ {:function => "jp_mountain_holiday(year)", :function_arguments => [:year], :year_ranges => { :from => 2022 },:name => "山の日", :regions => [:jp]},
47
+ {:function => "jp_mountain_holiday_substitute(year)", :function_arguments => [:year], :year_ranges => { :between => 2016..2020 },:name => "振替休日", :regions => [:jp]},
48
+ {:mday => 9, :year_ranges => { :limited => [2021] },:name => "振替休日", :regions => [:jp]},
49
+ {:function => "jp_mountain_holiday_substitute(year)", :function_arguments => [:year], :year_ranges => { :from => 2022 },:name => "振替休日", :regions => [:jp]}],
45
50
  9 => [{:wday => 1, :week => 3, :name => "敬老の日", :regions => [:jp]},
46
51
  {:function => "jp_respect_for_aged_holiday_substitute(year)", :function_arguments => [:year], :name => "振替休日", :regions => [:jp]},
47
52
  {:function => "jp_citizens_holiday(year)", :function_arguments => [:year], :year_ranges => { :from => 2003 },:name => "国民の休日", :regions => [:jp]},
48
53
  {:function => "jp_national_culture_day(year)", :function_arguments => [:year], :name => "秋分の日", :regions => [:jp]},
49
54
  {:function => "jp_national_culture_day_substitute(year)", :function_arguments => [:year], :name => "振替休日", :regions => [:jp]}],
50
55
  10 => [{:wday => 1, :week => 2, :year_ranges => { :until => 2019 },:name => "体育の日", :regions => [:jp]},
51
- {:wday => 1, :week => 2, :year_ranges => { :from => 2021 },:name => "スポーツの日", :regions => [:jp]},
56
+ {:wday => 1, :week => 2, :year_ranges => { :from => 2022 },:name => "スポーツの日", :regions => [:jp]},
52
57
  {:function => "jp_health_sports_day_substitute(year)", :function_arguments => [:year], :name => "振替休日", :regions => [:jp]},
53
58
  {:mday => 22, :year_ranges => { :limited => [2019] },:name => "即位礼正殿の儀", :regions => [:jp]}],
54
59
  11 => [{:mday => 3, :name => "文化の日", :regions => [:jp]},
@@ -0,0 +1,38 @@
1
+ # encoding: utf-8
2
+ module Holidays
3
+ # This file is generated by the Ruby Holidays gem.
4
+ #
5
+ # Definitions loaded: definitions/kz.yaml
6
+ #
7
+ # All the definitions are available at https://github.com/holidays/holidays
8
+ module KZ # :nodoc:
9
+ def self.defined_regions
10
+ [:kz]
11
+ end
12
+
13
+ def self.holidays_by_month
14
+ {
15
+ 1 => [{:mday => 1, :name => "Jańa jyl", :regions => [:kz]},
16
+ {:mday => 2, :name => "Jańa jyl", :regions => [:kz]}],
17
+ 3 => [{:mday => 8, :name => "Halyqaralyq áıelder kúni", :regions => [:kz]},
18
+ {:mday => 21, :name => "Naýryz Meıramy", :regions => [:kz]},
19
+ {:mday => 22, :name => "Naýryz Meıramy", :regions => [:kz]},
20
+ {:mday => 23, :name => "Naýryz Meıramy", :regions => [:kz]}],
21
+ 5 => [{:mday => 1, :name => "Qazaqstan halqynyń birligi merekesi", :regions => [:kz]},
22
+ {:mday => 7, :name => "Otan Qorǵaýshy kuni", :regions => [:kz]},
23
+ {:mday => 9, :name => "Jeńis kúni", :regions => [:kz]}],
24
+ 7 => [{:mday => 6, :name => "Astana kúni", :regions => [:kz]}],
25
+ 8 => [{:mday => 30, :name => "Qazaqstan Respýblıkasynyń Konstıtýcıyasy kúni", :regions => [:kz]}],
26
+ 12 => [{:mday => 1, :name => "Túńǵysh Prezıdent kúni", :regions => [:kz]},
27
+ {:mday => 16, :name => "Táýelsizdik kúni", :regions => [:kz]},
28
+ {:mday => 17, :name => "Táýelsizdik kúni", :regions => [:kz]}]
29
+ }
30
+ end
31
+
32
+ def self.custom_methods
33
+ {
34
+
35
+ }
36
+ end
37
+ end
38
+ end
@@ -74,6 +74,7 @@ module Holidays
74
74
  {:wday => 1, :week => 1, :name => "Jefferson Davis' Birthday", :regions => [:us_al]},
75
75
  {:mday => 3, :name => "Birthday of Jefferson Davis", :regions => [:us_fl]},
76
76
  {:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "King Kamehameha I Day", :regions => [:us_hi]},
77
+ {:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:us]},
77
78
  {:mday => 19, :name => "Emancipation Day in Texas", :regions => [:us_tx]},
78
79
  {:mday => 20, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "West Virginia Day", :regions => [:us_wv]},
79
80
  {:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
@@ -91,13 +92,14 @@ module Holidays
91
92
  {:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_nt, :ca_nu]},
92
93
  {:wday => 1, :week => 1, :type => :informal, :name => "Civic Holiday", :regions => [:ca_on, :ca_pe]},
93
94
  {:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
94
- {:wday => 1, :week => 1, :name => "Terry Fox Day", :regions => [:ca_mb]},
95
+ {:wday => 1, :week => 1, :type => :informal, :name => "Terry Fox Day", :regions => [:ca_mb]},
95
96
  {:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]},
96
97
  {:wday => 1, :week => 2, :name => "Victory Day", :regions => [:us_ri]},
97
98
  {:mday => 16, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Bennington Battle Day", :regions => [:us_vt]},
98
99
  {:wday => 5, :week => 3, :name => "Statehood Day", :regions => [:us_hi]},
99
100
  {:mday => 27, :name => "Lyndon Baines Johnson Day", :regions => [:us_tx]}],
100
101
  9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
102
+ {:mday => 30, :year_ranges => { :from => 2021 },:name => "National Day for Truth and Reconciliation", :regions => [:ca]},
101
103
  {:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
102
104
  {:mday => 16, :name => "Día de la Independencia", :regions => [:mx]},
103
105
  {:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]},
@@ -123,9 +125,12 @@ module Holidays
123
125
  {:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Lincoln's Birthday", :regions => [:us_in]},
124
126
  {:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "American Indian Heritage Day", :regions => [:us_md]},
125
127
  {:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Day after Thanksgiving (Black Friday)", :regions => [:us_ca, :us_de, :us_fl, :us_ia, :us_il, :us_ks, :us_ky, :us_me, :us_mi, :us_mn, :us_ms, :us_ne, :us_nh, :us_nc, :us_pa, :us_sc, :us_ok, :us_tn, :us_tx, :us_va, :us_wa, :us_wv]}],
126
- 12 => [{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca]},
127
- {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
128
- {:mday => 26, :observed => "to_weekday_if_boxing_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_sk, :ca_yt]},
128
+ 12 => [{:mday => 25, :year_ranges => { :until => 2020 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
129
+ {:mday => 25, :year_ranges => { :from => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
130
+ {: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]},
131
+ {:mday => 26, :year_ranges => { :until => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
132
+ {:mday => 26, :year_ranges => { :from => 2020 },:observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
133
+ {: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]},
129
134
  {:mday => 12, :type => :informal, :name => "Día de la Virgen de Guadalupe", :regions => [:mx]},
130
135
  {:mday => 24, :type => :informal, :name => "Nochebuena", :regions => [:mx]},
131
136
  {:mday => 25, :name => "Navidad", :regions => [:mx]},
@@ -50,6 +50,7 @@ module Holidays
50
50
  {:mday => 19, :name => "Declaración Independencia", :regions => [:ve]}],
51
51
  5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:ar]},
52
52
  {:mday => 25, :name => "Día de la Revolución de Mayo", :regions => [:ar]},
53
+ {:mday => 24, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]},
53
54
  {:mday => 1, :name => "Dia do Trabalho", :regions => [:br]},
54
55
  {:mday => 1, :name => "Día del Trabajo", :regions => [:cl]},
55
56
  {:mday => 21, :name => "Día de las Glorias Navales", :regions => [:cl]},
@@ -57,7 +58,8 @@ module Holidays
57
58
  {:mday => 1, :name => "Día del Trabajador", :regions => [:pe]},
58
59
  {:wday => 0, :week => 2, :type => :informal, :name => "Día de la Madre", :regions => [:pe]},
59
60
  {:mday => 1, :name => "Día del Trabajador", :regions => [:ve]}],
60
- 6 => [{:mday => 20, :name => "Día de la Bandera", :regions => [:ar]},
61
+ 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]},
62
+ {:mday => 20, :name => "Día de la Bandera", :regions => [:ar]},
61
63
  {:mday => 29, :year_ranges => { :until => 1999 },:name => "San Pedro y San Pablo", :regions => [:cl]},
62
64
  {:function => "saint_peter_and_saint_paul(year)", :function_arguments => [:year], :name => "San Pedro y San Pablo", :regions => [:co]},
63
65
  {:mday => 7, :type => :informal, :name => "Día de la Bandera", :regions => [:pe]},
@@ -65,7 +67,7 @@ module Holidays
65
67
  {:mday => 24, :type => :informal, :name => "Inti Raymi", :regions => [:pe]},
66
68
  {:mday => 29, :name => "San Pablo y San Pedro", :regions => [:pe]},
67
69
  {:mday => 24, :name => "Aniversario Batalla de Carabobo", :regions => [:ve]}],
68
- 7 => [{:mday => 8, :name => "Feriado puente turístico", :regions => [:ar]},
70
+ 7 => [{:mday => 8, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
69
71
  {:mday => 9, :name => "Día de la Independencia", :regions => [:ar]},
70
72
  {:mday => 16, :name => "Día de la Virgen del Carmen", :regions => [:cl]},
71
73
  {:mday => 20, :name => "Día de la Independencia", :regions => [:co]},
@@ -73,12 +75,13 @@ module Holidays
73
75
  {:mday => 29, :name => "Segundo Día de la Independencia", :regions => [:pe]},
74
76
  {:mday => 5, :name => "Día de la Independencia", :regions => [:ve]},
75
77
  {:mday => 24, :name => "Natalicio de Simón Bolívar", :regions => [:ve]}],
76
- 8 => [{:mday => 15, :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]},
78
+ 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]},
77
79
  {:mday => 15, :name => "Asunción de la Virgen", :regions => [:cl]},
78
80
  {:mday => 7, :name => "Batalla de Boyacá", :regions => [:co]},
79
81
  {:function => "assumption_of_mary(year)", :function_arguments => [:year], :name => "La Asunción de la Virgen", :regions => [:co]},
80
82
  {:mday => 30, :name => "Santa Rosa de Lima", :regions => [:pe]}],
81
- 10 => [{:mday => 12, :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
83
+ 10 => [{:mday => 12, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
84
+ {:mday => 8, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]},
82
85
  {:mday => 12, :name => "Dia de Nossa Senhora Aparecida", :regions => [:br]},
83
86
  {:mday => 12, :year_ranges => { :until => 1999 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
84
87
  {:function => "columbus_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
@@ -86,6 +89,7 @@ module Holidays
86
89
  {:mday => 8, :name => "Batalla de Angamos", :regions => [:pe]},
87
90
  {:mday => 12, :name => "Día de la Resistencia Indígena", :regions => [:ve]}],
88
91
  11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]},
92
+ {:mday => 22, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]},
89
93
  {:mday => 2, :name => "Dia de Finados", :regions => [:br]},
90
94
  {:mday => 15, :name => "Proclamação da República", :regions => [:br]},
91
95
  {:mday => 1, :name => "Día de Todos los Santos", :regions => [:cl]},
@@ -93,7 +97,7 @@ module Holidays
93
97
  {:function => "independence_of_cartagena(year)", :function_arguments => [:year], :name => "Independencia de Cartagena", :regions => [:co]},
94
98
  {:mday => 1, :name => "Todos los Santos", :regions => [:pe]}],
95
99
  12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:ar]},
96
- {:mday => 9, :name => "Feriado puente turístico", :regions => [:ar]},
100
+ {:mday => 9, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
97
101
  {:mday => 25, :name => "Navidad", :regions => [:ar]},
98
102
  {:mday => 25, :name => "Natal", :regions => [:br]},
99
103
  {:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:cl]},
@@ -112,7 +116,22 @@ module Holidays
112
116
 
113
117
  def self.custom_methods
114
118
  {
115
- "st_peter_st_paul_cl(year)" => Proc.new { |year|
119
+ "to_nearest_monday(date)" => Proc.new { |date|
120
+ case date.wday
121
+ when 5
122
+ date += 3
123
+ when 4
124
+ date += 4
125
+ when 3
126
+ date -= 2
127
+ when 2
128
+ date -= 1
129
+ end
130
+
131
+ date
132
+ },
133
+
134
+ "st_peter_st_paul_cl(year)" => Proc.new { |year|
116
135
  date = Date.civil(year, 6, 29)
117
136
  if [2,3,4].include?(date.wday)
118
137
  date -= (date.wday - 1)
@@ -51,6 +51,7 @@ module Holidays
51
51
  6 => [{:wday => 1, :week => 1, :name => "Jefferson Davis' Birthday", :regions => [:us_al]},
52
52
  {:mday => 3, :name => "Birthday of Jefferson Davis", :regions => [:us_fl]},
53
53
  {:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "King Kamehameha I Day", :regions => [:us_hi]},
54
+ {:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:us]},
54
55
  {:mday => 19, :name => "Emancipation Day in Texas", :regions => [:us_tx]},
55
56
  {:mday => 20, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "West Virginia Day", :regions => [:us_wv]},
56
57
  {:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
@@ -23,7 +23,7 @@ module Holidays
23
23
  9 => [{:mday => 24, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Heritage Day", :regions => [:za]}],
24
24
  12 => [{:mday => 16, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Day of Reconciliation", :regions => [:za]},
25
25
  {:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:za]},
26
- {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Day of Goodwill", :regions => [:za]}]
26
+ {:mday => 26, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Day of Goodwill", :regions => [:za]}]
27
27
  }
28
28
  end
29
29
 
@@ -1,3 +1,3 @@
1
1
  module Holidays
2
- VERSION = '8.2.0'
2
+ VERSION = '8.5.0'
3
3
  end
@@ -31,21 +31,37 @@ class ArDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_equal "Día de la Revolución de Mayo", (Holidays.on(Date.civil(2016, 5, 25), [:ar], [:informal])[0] || {})[:name]
33
33
 
34
- assert_equal "Día de la Bandera", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
34
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2020, 6, 15), [:ar], [:informal])[0] || {})[:name]
35
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2021, 6, 21), [:ar], [:informal])[0] || {})[:name]
35
36
 
36
- assert_equal "Feriado puente turístico", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
37
+ assert_nil (Holidays.on(Date.civil(2020, 6, 17), [:ar], [:informal])[0] || {})[:name]
38
+ assert_nil (Holidays.on(Date.civil(2021, 6, 17), [:ar], [:informal])[0] || {})[:name]
39
+
40
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
37
41
 
38
42
  assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2016, 7, 9), [:ar], [:informal])[0] || {})[:name]
39
43
 
40
44
  assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2016, 8, 15), [:ar], [:informal])[0] || {})[:name]
45
+ assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2020, 8, 17), [:ar], [:informal])[0] || {})[:name]
46
+ assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2021, 8, 16), [:ar], [:informal])[0] || {})[:name]
47
+
48
+ assert_nil (Holidays.on(Date.civil(2016, 8, 17), [:ar], [:informal])[0] || {})[:name]
49
+ assert_nil (Holidays.on(Date.civil(2021, 8, 17), [:ar], [:informal])[0] || {})[:name]
50
+
51
+ assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 10), [:ar], [:informal])[0] || {})[:name]
52
+ assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2021, 10, 11), [:ar], [:informal])[0] || {})[:name]
41
53
 
42
- assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 12), [:ar], [:informal])[0] || {})[:name]
54
+ assert_nil (Holidays.on(Date.civil(2021, 10, 12), [:ar], [:informal])[0] || {})[:name]
43
55
 
44
56
  assert_equal "Día de la Soberanía Nacional", (Holidays.on(Date.civil(2016, 11, 20), [:ar], [:informal])[0] || {})[:name]
45
57
 
46
58
  assert_equal "Inmaculada Concepción de María", (Holidays.on(Date.civil(2016, 12, 8), [:ar], [:informal])[0] || {})[:name]
47
59
 
48
- assert_equal "Feriado puente turístico", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
60
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
61
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
62
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 5, 24), [:ar], [:informal])[0] || {})[:name]
63
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 10, 8), [:ar], [:informal])[0] || {})[:name]
64
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 11, 22), [:ar], [:informal])[0] || {})[:name]
49
65
 
50
66
  assert_equal "Navidad", (Holidays.on(Date.civil(2016, 12, 25), [:ar], [:informal])[0] || {})[:name]
51
67
 
@@ -196,5 +196,7 @@ assert_equal "Queen's Birthday", (Holidays.on(Date.civil(2016, 9, 26), [:au_wa])
196
196
 
197
197
  assert_equal "G20 Day", (Holidays.on(Date.civil(2014, 11, 14), [:au_qld_brisbane])[0] || {})[:name]
198
198
 
199
+ assert_nil (Holidays.on(Date.civil(2021, 4, 26), [:au_vic])[0] || {})[:name]
200
+
199
201
  end
200
202
  end
@@ -19,7 +19,7 @@ class CaDefinitionTests < Test::Unit::TestCase # :nodoc:
19
19
 
20
20
  assert_equal "Labour Day", (Holidays.on(Date.civil(2008, 9, 1), [:ca], [:informal])[0] || {})[:name]
21
21
 
22
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca], [:informal])[0] || {})[:name]
22
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca_on], [:informal])[0] || {})[:name]
23
23
 
24
24
  assert_equal "Family Day", (Holidays.on(Date.civil(1990, 2, 19), [:ca_ab])[0] || {})[:name]
25
25
 
@@ -201,28 +201,37 @@ assert_equal "Remembrance Day", (Holidays.on(Date.civil(2017, 11, 13), [:ca_ab,
201
201
 
202
202
  assert_equal "Canada Day", (Holidays.on(Date.civil(2017, 7, 3), [:ca], [:observed])[0] || {})[:name]
203
203
 
204
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca])[0] || {})[:name]
204
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca])[0] || {})[:name]
205
205
 
206
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca])[0] || {})[:name]
206
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca])[0] || {})[:name]
207
207
 
208
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca])[0] || {})[:name]
208
+ assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
209
+
210
+ assert_nil (Holidays.on(Date.civil(1985, 9, 30), [:ca])[0] || {})[:name]
211
+
212
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca_on])[0] || {})[:name]
213
+
214
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca_on])[0] || {})[:name]
215
+
216
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca_on])[0] || {})[:name]
209
217
 
210
218
  assert_nil (Holidays.on(Date.civil(2022, 12, 25), [:ca], [:observed])[0] || {})[:name]
211
219
 
212
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca], [:observed])[0] || {})[:name]
220
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca_on], [:observed])[0] || {})[:name]
221
+
222
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca_on], [:observed])[0] || {})[:name]
213
223
 
214
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca], [:observed])[0] || {})[:name]
224
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
215
225
 
216
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca], [:observed])[0] || {})[:name]
226
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt], [:observed])[0] || {})[:name]
217
227
 
218
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca], [:observed])[0] || {})[:name]
228
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
219
229
 
220
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca], [:observed])[0] || {})[:name]
230
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
221
231
 
222
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
232
+ assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
223
233
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2012, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
224
234
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2015, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
225
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
226
235
 
227
236
  assert_nil (Holidays.on(Date.civil(2015, 6, 21), [:ca_yt])[0] || {})[:name]
228
237
 
@@ -232,13 +241,15 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
232
241
 
233
242
  assert_equal "National Aboriginal Day", (Holidays.on(Date.civil(2018, 6, 21), [:ca_yt])[0] || {})[:name]
234
243
 
235
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb])[0] || {})[:name]
244
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb], [:informal])[0] || {})[:name]
245
+
246
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
236
247
 
237
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
248
+ assert_nil (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
238
249
 
239
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb])[0] || {})[:name]
250
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
240
251
 
241
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb])[0] || {})[:name]
252
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb], [:informal])[0] || {})[:name]
242
253
 
243
254
  assert_equal "Nunavut Day", (Holidays.on(Date.civil(2020, 7, 9), [:ca_nu])[0] || {})[:name]
244
255
 
@@ -43,5 +43,9 @@ class ChDefinitionTests < Test::Unit::TestCase # :nodoc:
43
43
 
44
44
  assert_equal "Näfelser Fahrt", (Holidays.on(Date.civil(2014, 4, 3), [:ch_gl])[0] || {})[:name]
45
45
 
46
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2014, 11, 24), [:ch_be])[0] || {})[:name]
47
+
48
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2020, 11, 23), [:ch_be])[0] || {})[:name]
49
+
46
50
  end
47
51
  end
@@ -131,5 +131,7 @@ class EsDefinitionTests < Test::Unit::TestCase # :nodoc:
131
131
 
132
132
  assert_equal "Fiesta Nacional de Cataluña", (Holidays.on(Date.civil(2009, 9, 11), [:es_ct])[0] || {})[:name]
133
133
 
134
+ assert_equal "Lunes de Pascua Granada", (Holidays.on(Date.civil(2020, 6, 1), [:es_ct])[0] || {})[:name]
135
+
134
136
  end
135
137
  end
@@ -131,6 +131,10 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
131
131
 
132
132
  assert_equal "Näfelser Fahrt", (Holidays.on(Date.civil(2014, 4, 3), [:ch_gl])[0] || {})[:name]
133
133
 
134
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2014, 11, 24), [:ch_be])[0] || {})[:name]
135
+
136
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2020, 11, 23), [:ch_be])[0] || {})[:name]
137
+
134
138
  assert_equal "Den obnovy samostatného českého státu", (Holidays.on(Date.civil(2010, 1, 1), [:cz], [:informal])[0] || {})[:name]
135
139
 
136
140
  assert_equal "Velký pátek", (Holidays.on(Date.civil(2016, 3, 25), [:cz], [:informal])[0] || {})[:name]
@@ -417,6 +421,8 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
417
421
 
418
422
  assert_equal "Fiesta Nacional de Cataluña", (Holidays.on(Date.civil(2009, 9, 11), [:es_ct])[0] || {})[:name]
419
423
 
424
+ assert_equal "Lunes de Pascua Granada", (Holidays.on(Date.civil(2020, 6, 1), [:es_ct])[0] || {})[:name]
425
+
420
426
  assert_equal "Jour de l'an", (Holidays.on(Date.civil(2007, 1, 1), [:fr])[0] || {})[:name]
421
427
 
422
428
  assert_equal "Lundi de Pâques", (Holidays.on(Date.civil(2007, 4, 9), [:fr])[0] || {})[:name]
@@ -473,6 +479,22 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
473
479
 
474
480
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2019, 3, 18), [:gb_nir], [:observed, :informal])[0] || {})[:name]
475
481
 
482
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir])[0] || {})[:name]
483
+
484
+ assert_nil (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
485
+
486
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
487
+
488
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 12), [:gb_nir])[0] || {})[:name]
489
+
490
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 14), [:gb_nir], [:observed])[0] || {})[:name]
491
+
492
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir])[0] || {})[:name]
493
+
494
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
495
+
496
+ assert_nil (Holidays.on(Date.civil(2021, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
497
+
476
498
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal])[0] || {})[:name]
477
499
 
478
500
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal, :observed])[0] || {})[:name]
@@ -555,6 +577,14 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
555
577
 
556
578
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2018, 8, 27), [:je])[0] || {})[:name]
557
579
 
580
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2022, 6, 2), [:gb])[0] || {})[:name]
581
+
582
+ assert_nil (Holidays.on(Date.civil(2022, 5, 30), [:gb])[0] || {})[:name]
583
+
584
+ assert_equal "Platinum Jubilee", (Holidays.on(Date.civil(2022, 6, 3), [:gb])[0] || {})[:name]
585
+
586
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
587
+
558
588
  assert_equal "Nova godina", (Holidays.on(Date.civil(2012, 1, 1), [:hr], [:informal])[0] || {})[:name]
559
589
 
560
590
  assert_equal "Bogojavljenje ili Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
@@ -15,6 +15,10 @@ class FederalreservebanksDefinitionTests < Test::Unit::TestCase # :nodoc:
15
15
 
16
16
  assert_equal "Memorial Day", (Holidays.on(Date.civil(2012, 5, 28), [:federalreservebanks], [:observed])[0] || {})[:name]
17
17
 
18
+ assert_nil (Holidays.on(Date.civil(2021, 6, 19), [:federalreservebanks], [:observed])[0] || {})[:name]
19
+
20
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2021, 6, 18), [:federalreservebanks], [:observed])[0] || {})[:name]
21
+
18
22
  assert_equal "Independence Day", (Holidays.on(Date.civil(2012, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
19
23
 
20
24
  assert_equal "Labor Day", (Holidays.on(Date.civil(2012, 9, 3), [:federalreservebanks], [:observed])[0] || {})[:name]
@@ -31,6 +31,22 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2019, 3, 18), [:gb_nir], [:observed, :informal])[0] || {})[:name]
33
33
 
34
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir])[0] || {})[:name]
35
+
36
+ assert_nil (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
37
+
38
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
39
+
40
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 12), [:gb_nir])[0] || {})[:name]
41
+
42
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 14), [:gb_nir], [:observed])[0] || {})[:name]
43
+
44
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir])[0] || {})[:name]
45
+
46
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
47
+
48
+ assert_nil (Holidays.on(Date.civil(2021, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
49
+
34
50
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal])[0] || {})[:name]
35
51
 
36
52
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal, :observed])[0] || {})[:name]
@@ -113,5 +129,13 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
113
129
 
114
130
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2018, 8, 27), [:je])[0] || {})[:name]
115
131
 
132
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2022, 6, 2), [:gb])[0] || {})[:name]
133
+
134
+ assert_nil (Holidays.on(Date.civil(2022, 5, 30), [:gb])[0] || {})[:name]
135
+
136
+ assert_equal "Platinum Jubilee", (Holidays.on(Date.civil(2022, 6, 3), [:gb])[0] || {})[:name]
137
+
138
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
139
+
116
140
  end
117
141
  end
@@ -115,7 +115,7 @@ class JpDefinitionTests < Test::Unit::TestCase # :nodoc:
115
115
 
116
116
  assert_equal "海の日", (Holidays.on(Date.civil(2020, 7, 23), [:jp])[0] || {})[:name]
117
117
 
118
- assert_equal "海の日", (Holidays.on(Date.civil(2021, 7, 19), [:jp])[0] || {})[:name]
118
+ assert_equal "海の日", (Holidays.on(Date.civil(2021, 7, 22), [:jp])[0] || {})[:name]
119
119
 
120
120
  assert_equal "山の日", (Holidays.on(Date.civil(2016, 8, 11), [:jp])[0] || {})[:name]
121
121
 
@@ -129,7 +129,9 @@ class JpDefinitionTests < Test::Unit::TestCase # :nodoc:
129
129
 
130
130
  assert_nil (Holidays.on(Date.civil(2020, 8, 11), [:jp])[0] || {})[:name]
131
131
 
132
- assert_equal "山の日", (Holidays.on(Date.civil(2021, 8, 11), [:jp])[0] || {})[:name]
132
+ assert_equal "山の日", (Holidays.on(Date.civil(2021, 8, 8), [:jp])[0] || {})[:name]
133
+
134
+ assert_equal "振替休日", (Holidays.on(Date.civil(2021, 8, 9), [:jp])[0] || {})[:name]
133
135
 
134
136
  assert_equal "山の日", (Holidays.on(Date.civil(2022, 8, 11), [:jp])[0] || {})[:name]
135
137
 
@@ -151,7 +153,7 @@ class JpDefinitionTests < Test::Unit::TestCase # :nodoc:
151
153
 
152
154
  assert_nil (Holidays.on(Date.civil(2020, 10, 12), [:jp])[0] || {})[:name]
153
155
 
154
- assert_equal "スポーツの日", (Holidays.on(Date.civil(2021, 10, 11), [:jp])[0] || {})[:name]
156
+ assert_equal "スポーツの日", (Holidays.on(Date.civil(2021, 7, 23), [:jp])[0] || {})[:name]
155
157
 
156
158
  end
157
159
  end
@@ -0,0 +1,39 @@
1
+ # encoding: utf-8
2
+ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: definitions/kz.yaml
7
+ class KzDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_kz
10
+ assert_equal "Jańa jyl", (Holidays.on(Date.civil(2020, 1, 1), [:kz])[0] || {})[:name]
11
+
12
+ assert_equal "Jańa jyl", (Holidays.on(Date.civil(2020, 1, 2), [:kz])[0] || {})[:name]
13
+
14
+ assert_equal "Halyqaralyq áıelder kúni", (Holidays.on(Date.civil(2020, 3, 8), [:kz])[0] || {})[:name]
15
+
16
+ assert_equal "Naýryz Meıramy", (Holidays.on(Date.civil(2020, 3, 21), [:kz])[0] || {})[:name]
17
+
18
+ assert_equal "Naýryz Meıramy", (Holidays.on(Date.civil(2020, 3, 22), [:kz])[0] || {})[:name]
19
+
20
+ assert_equal "Naýryz Meıramy", (Holidays.on(Date.civil(2020, 3, 23), [:kz])[0] || {})[:name]
21
+
22
+ assert_equal "Qazaqstan halqynyń birligi merekesi", (Holidays.on(Date.civil(2020, 5, 1), [:kz])[0] || {})[:name]
23
+
24
+ assert_equal "Otan Qorǵaýshy kuni", (Holidays.on(Date.civil(2020, 5, 7), [:kz])[0] || {})[:name]
25
+
26
+ assert_equal "Jeńis kúni", (Holidays.on(Date.civil(2020, 5, 9), [:kz])[0] || {})[:name]
27
+
28
+ assert_equal "Astana kúni", (Holidays.on(Date.civil(2020, 7, 6), [:kz])[0] || {})[:name]
29
+
30
+ assert_equal "Qazaqstan Respýblıkasynyń Konstıtýcıyasy kúni", (Holidays.on(Date.civil(2020, 8, 30), [:kz])[0] || {})[:name]
31
+
32
+ assert_equal "Túńǵysh Prezıdent kúni", (Holidays.on(Date.civil(2020, 12, 1), [:kz])[0] || {})[:name]
33
+
34
+ assert_equal "Táýelsizdik kúni", (Holidays.on(Date.civil(2020, 12, 16), [:kz])[0] || {})[:name]
35
+
36
+ assert_equal "Táýelsizdik kúni", (Holidays.on(Date.civil(2020, 12, 17), [:kz])[0] || {})[:name]
37
+
38
+ end
39
+ end
@@ -19,7 +19,7 @@ class NorthamericaDefinitionTests < Test::Unit::TestCase # :nodoc:
19
19
 
20
20
  assert_equal "Labour Day", (Holidays.on(Date.civil(2008, 9, 1), [:ca], [:informal])[0] || {})[:name]
21
21
 
22
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca], [:informal])[0] || {})[:name]
22
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca_on], [:informal])[0] || {})[:name]
23
23
 
24
24
  assert_equal "Family Day", (Holidays.on(Date.civil(1990, 2, 19), [:ca_ab])[0] || {})[:name]
25
25
 
@@ -201,28 +201,37 @@ assert_equal "Remembrance Day", (Holidays.on(Date.civil(2017, 11, 13), [:ca_ab,
201
201
 
202
202
  assert_equal "Canada Day", (Holidays.on(Date.civil(2017, 7, 3), [:ca], [:observed])[0] || {})[:name]
203
203
 
204
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca])[0] || {})[:name]
204
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca])[0] || {})[:name]
205
205
 
206
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca])[0] || {})[:name]
206
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca])[0] || {})[:name]
207
207
 
208
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca])[0] || {})[:name]
208
+ assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
209
+
210
+ assert_nil (Holidays.on(Date.civil(1985, 9, 30), [:ca])[0] || {})[:name]
211
+
212
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca_on])[0] || {})[:name]
213
+
214
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca_on])[0] || {})[:name]
215
+
216
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca_on])[0] || {})[:name]
209
217
 
210
218
  assert_nil (Holidays.on(Date.civil(2022, 12, 25), [:ca], [:observed])[0] || {})[:name]
211
219
 
212
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca], [:observed])[0] || {})[:name]
220
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca_on], [:observed])[0] || {})[:name]
213
221
 
214
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca], [:observed])[0] || {})[:name]
222
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca_on], [:observed])[0] || {})[:name]
215
223
 
216
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca], [:observed])[0] || {})[:name]
224
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
217
225
 
218
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca], [:observed])[0] || {})[:name]
226
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt], [:observed])[0] || {})[:name]
219
227
 
220
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca], [:observed])[0] || {})[:name]
228
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
221
229
 
222
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
230
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
231
+
232
+ assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
223
233
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2012, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
224
234
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2015, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
225
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
226
235
 
227
236
  assert_nil (Holidays.on(Date.civil(2015, 6, 21), [:ca_yt])[0] || {})[:name]
228
237
 
@@ -232,13 +241,15 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
232
241
 
233
242
  assert_equal "National Aboriginal Day", (Holidays.on(Date.civil(2018, 6, 21), [:ca_yt])[0] || {})[:name]
234
243
 
235
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb])[0] || {})[:name]
244
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb], [:informal])[0] || {})[:name]
245
+
246
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
236
247
 
237
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
248
+ assert_nil (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
238
249
 
239
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb])[0] || {})[:name]
250
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
240
251
 
241
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb])[0] || {})[:name]
252
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb], [:informal])[0] || {})[:name]
242
253
 
243
254
  assert_equal "Nunavut Day", (Holidays.on(Date.civil(2020, 7, 9), [:ca_nu])[0] || {})[:name]
244
255
 
@@ -452,6 +463,10 @@ assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2022, 6, 10), [:us
452
463
 
453
464
  assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2017, 6, 11), [:us_hi])[0] || {})[:name]
454
465
 
466
+ assert_nil (Holidays.on(Date.civil(2021, 6, 19), [:us], [:observed])[0] || {})[:name]
467
+
468
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2021, 6, 18), [:us], [:observed])[0] || {})[:name]
469
+
455
470
  assert_equal "Emancipation Day in Texas", (Holidays.on(Date.civil(2017, 6, 19), [:us_tx])[0] || {})[:name]
456
471
 
457
472
  assert_nil (Holidays.on(Date.civil(2017, 6, 20), [:us])[0] || {})[:name]
@@ -31,21 +31,37 @@ class SouthamericaDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_equal "Día de la Revolución de Mayo", (Holidays.on(Date.civil(2016, 5, 25), [:ar], [:informal])[0] || {})[:name]
33
33
 
34
- assert_equal "Día de la Bandera", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
34
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2020, 6, 15), [:ar], [:informal])[0] || {})[:name]
35
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2021, 6, 21), [:ar], [:informal])[0] || {})[:name]
35
36
 
36
- assert_equal "Feriado puente turístico", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
37
+ assert_nil (Holidays.on(Date.civil(2020, 6, 17), [:ar], [:informal])[0] || {})[:name]
38
+ assert_nil (Holidays.on(Date.civil(2021, 6, 17), [:ar], [:informal])[0] || {})[:name]
39
+
40
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
37
41
 
38
42
  assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2016, 7, 9), [:ar], [:informal])[0] || {})[:name]
39
43
 
40
44
  assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2016, 8, 15), [:ar], [:informal])[0] || {})[:name]
45
+ assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2020, 8, 17), [:ar], [:informal])[0] || {})[:name]
46
+ assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2021, 8, 16), [:ar], [:informal])[0] || {})[:name]
47
+
48
+ assert_nil (Holidays.on(Date.civil(2016, 8, 17), [:ar], [:informal])[0] || {})[:name]
49
+ assert_nil (Holidays.on(Date.civil(2021, 8, 17), [:ar], [:informal])[0] || {})[:name]
50
+
51
+ assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 10), [:ar], [:informal])[0] || {})[:name]
52
+ assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2021, 10, 11), [:ar], [:informal])[0] || {})[:name]
41
53
 
42
- assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 12), [:ar], [:informal])[0] || {})[:name]
54
+ assert_nil (Holidays.on(Date.civil(2021, 10, 12), [:ar], [:informal])[0] || {})[:name]
43
55
 
44
56
  assert_equal "Día de la Soberanía Nacional", (Holidays.on(Date.civil(2016, 11, 20), [:ar], [:informal])[0] || {})[:name]
45
57
 
46
58
  assert_equal "Inmaculada Concepción de María", (Holidays.on(Date.civil(2016, 12, 8), [:ar], [:informal])[0] || {})[:name]
47
59
 
48
- assert_equal "Feriado puente turístico", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
60
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
61
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
62
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 5, 24), [:ar], [:informal])[0] || {})[:name]
63
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 10, 8), [:ar], [:informal])[0] || {})[:name]
64
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 11, 22), [:ar], [:informal])[0] || {})[:name]
49
65
 
50
66
  assert_equal "Navidad", (Holidays.on(Date.civil(2016, 12, 25), [:ar], [:informal])[0] || {})[:name]
51
67
 
@@ -193,6 +193,10 @@ assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2022, 6, 10), [:us
193
193
 
194
194
  assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2017, 6, 11), [:us_hi])[0] || {})[:name]
195
195
 
196
+ assert_nil (Holidays.on(Date.civil(2021, 6, 19), [:us], [:observed])[0] || {})[:name]
197
+
198
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2021, 6, 18), [:us], [:observed])[0] || {})[:name]
199
+
196
200
  assert_equal "Emancipation Day in Texas", (Holidays.on(Date.civil(2017, 6, 19), [:us_tx])[0] || {})[:name]
197
201
 
198
202
  assert_nil (Holidays.on(Date.civil(2017, 6, 20), [:us])[0] || {})[:name]
@@ -18,6 +18,6 @@ class AvailableRegionsTests < Test::Unit::TestCase
18
18
  # This test might fail if we add new regions. Since this is an integration test
19
19
  # I am fine with that!
20
20
  def test_available_regions_returns_correct_number_of_regions
21
- assert_equal 257, Holidays.available_regions.count
21
+ assert_equal 258, Holidays.available_regions.count
22
22
  end
23
23
  end
@@ -142,28 +142,6 @@ class HolidaysTests < Test::Unit::TestCase
142
142
  assert_empty holidays
143
143
  end
144
144
 
145
- def test_year_holidays_feb_29_on_non_leap_year
146
- assert_raises ArgumentError do
147
- Holidays.year_holidays([:ca_on], Date.civil(2015, 2, 29))
148
- end
149
-
150
- assert_raises ArgumentError do
151
- Holidays.year_holidays([:ca_on], Date.civil(2019, 2, 29))
152
- end
153
-
154
- assert_raises ArgumentError do
155
- Holidays.year_holidays([:ca_on], Date.civil(2021, 2, 29))
156
- end
157
-
158
- assert_raises ArgumentError do
159
- Holidays.year_holidays([:us], Date.civil(2023, 2, 29))
160
- end
161
-
162
- assert_raises ArgumentError do
163
- Holidays.year_holidays([:ca_on], Date.civil(2025, 2, 29))
164
- end
165
- end
166
-
167
145
  def test_year_holidays_random_years
168
146
  # Should be 1 less holiday, as Family day didn't exist in Ontario in 1990
169
147
  holidays = Holidays.year_holidays([:ca_on], Date.civil(1990, 1, 1))
@@ -174,10 +152,10 @@ class HolidaysTests < Test::Unit::TestCase
174
152
  assert_equal 8, holidays.length
175
153
 
176
154
  holidays = Holidays.year_holidays([:ca_on], Date.civil(2020, 1, 1))
177
- assert_equal 9, holidays.length
155
+ assert_equal 11, holidays.length
178
156
 
179
157
  holidays = Holidays.year_holidays([:ca_on], Date.civil(2050, 1, 1))
180
- assert_equal 9, holidays.length
158
+ assert_equal 10, holidays.length
181
159
 
182
160
  holidays = Holidays.year_holidays([:jp], Date.civil(2070, 1, 1))
183
161
  assert_equal 19, holidays.length
@@ -266,6 +244,6 @@ class HolidaysTests < Test::Unit::TestCase
266
244
 
267
245
  def test_load_all
268
246
  Holidays.load_all
269
- assert_equal 257, Holidays.available_regions.count
247
+ assert_equal 258, Holidays.available_regions.count
270
248
  end
271
249
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holidays
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.2.0
4
+ version: 8.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Dunae
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-28 00:00:00.000000000 Z
12
+ date: 2022-01-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -155,6 +155,7 @@ files:
155
155
  - lib/generated_definitions/it.rb
156
156
  - lib/generated_definitions/jp.rb
157
157
  - lib/generated_definitions/kr.rb
158
+ - lib/generated_definitions/kz.rb
158
159
  - lib/generated_definitions/li.rb
159
160
  - lib/generated_definitions/lt.rb
160
161
  - lib/generated_definitions/lu.rb
@@ -285,6 +286,7 @@ files:
285
286
  - test/defs/test_defs_it.rb
286
287
  - test/defs/test_defs_jp.rb
287
288
  - test/defs/test_defs_kr.rb
289
+ - test/defs/test_defs_kz.rb
288
290
  - test/defs/test_defs_li.rb
289
291
  - test/defs/test_defs_lt.rb
290
292
  - test/defs/test_defs_lu.rb
@@ -383,7 +385,7 @@ require_paths:
383
385
  - lib
384
386
  required_ruby_version: !ruby/object:Gem::Requirement
385
387
  requirements:
386
- - - "~>"
388
+ - - ">="
387
389
  - !ruby/object:Gem::Version
388
390
  version: '2.4'
389
391
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -392,7 +394,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
394
  - !ruby/object:Gem::Version
393
395
  version: '0'
394
396
  requirements: []
395
- rubygems_version: 3.0.3
397
+ rubygems_version: 3.1.2
396
398
  signing_key:
397
399
  specification_version: 4
398
400
  summary: A collection of Ruby methods to deal with statutory and other holidays.
@@ -444,6 +446,7 @@ test_files:
444
446
  - test/defs/test_defs_it.rb
445
447
  - test/defs/test_defs_jp.rb
446
448
  - test/defs/test_defs_kr.rb
449
+ - test/defs/test_defs_kz.rb
447
450
  - test/defs/test_defs_li.rb
448
451
  - test/defs/test_defs_lt.rb
449
452
  - test/defs/test_defs_lu.rb