holidays 8.6.0 → 8.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9eb1a9a2387a3734d10203b125345004d0c470ccc2394b82e36f57277a487db0
4
- data.tar.gz: 9a77c89d65379366e70b9d6e3eed67080ce5fadb096c11dad1b5edb81dee2e8c
3
+ metadata.gz: 572db74799733f361987b49b2e749a1f5953368bd56f89dedab02f217b86167c
4
+ data.tar.gz: 9a6bfce2599a6deb49ce351fcca8ea8fdc799b42fcd29c8cb0d9ed71185cefa2
5
5
  SHA512:
6
- metadata.gz: 5580b2c4ed9f227fc68558382fa2635df1fb234291b7bd554f3675bea59cf81345be20de1cc7fa8babb9cd445cf1d076dde9eebed1947d75a5a956fdf2ae2158
7
- data.tar.gz: 210b384735179c141e9c15d0de847449a3e70cd7e468453afd9b038afced110c1ea957b69d48e1196e524a2da3804af1d3502558407f4a9b71e998fb9ae3da64
6
+ metadata.gz: dfe795b467494aaf0eb595f6355bf98ba9bbc503c065491261a498bb745db3d35ce38c6d5a9edefa1eee641bd8bd71838e2571220d5c3ffa58231a069688e401
7
+ data.tar.gz: 688be4308f0721b7a8ba6fa7e4e8bed668facab50132f266ab8fca1c9466e25677f917029dc9ce1a6862a4fd0df860822c10a891cc5d9d5c3ab020834484e7e7
@@ -0,0 +1,25 @@
1
+ name: Ruby
2
+ on:
3
+ push:
4
+ branches: [ "master" ]
5
+ pull_request:
6
+ branches: [ "master" ]
7
+ permissions:
8
+ contents: read
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', 'ruby-head']
15
+ env:
16
+ BUNDLER_NO_OLD_RUBYGEMS_WARNING: true
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
21
+ with:
22
+ ruby-version: ${{ matrix.ruby-version }}
23
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
24
+ - name: Run tests
25
+ run: make test
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Ruby Holidays Gem CHANGELOG
2
2
 
3
+ ## 8.7.1
4
+
5
+ * Fix testing issues and github action config, no behavior changes
6
+ * Remove Travis CI config
7
+
8
+ ## 8.7.0
9
+
10
+ * Update to [v5.6.2 definitions](https://github.com/holidays/definitions/releases/tag/v5.6.2). Please see the changelog for the definition details.
11
+ * Add support for ruby 2.7, 3.0, 3.1, 3.2, 3.3
12
+ * Add GitHub actions support since Travis CI is not free for OSS anymore
13
+
3
14
  ## 8.6.0
4
15
 
5
16
  * Update to [v5.5.0 definitions](https://github.com/holidays/definitions/releases/tag/v5.5.0). Please see the changelog for the definition details.
@@ -7,22 +18,22 @@
7
18
 
8
19
  ## 8.5.0
9
20
 
10
- * Update submodule definitions.
21
+ * Update submodule definitions.
11
22
  * Thanks to contributors!!
12
23
 
13
24
  ## 8.4.1
14
25
 
15
- * Fix jp holidays from 2022.
26
+ * Fix jp holidays from 2022.
16
27
 
17
28
  ## 8.4.0
18
29
 
19
- * Update submodule definitions.
30
+ * Update submodule definitions
20
31
  * Thanks to contributors!!
21
32
 
22
33
 
23
34
  ## 8.3.0
24
35
 
25
- * Update submodule definitions.
36
+ * Update submodule definitions
26
37
  * Remove test about feb 29 on non leap year.
27
38
  * Thanks to contributors!!
28
39
 
data/README.md CHANGED
@@ -17,7 +17,12 @@ This gem is tested with the following ruby versions:
17
17
  * 2.4.5
18
18
  * 2.5.3
19
19
  * 2.6.1
20
- * JRuby 9.2.5.0
20
+ * 2.7.7
21
+ * 3.0.6
22
+ * 3.1.4
23
+ * 3.2.2
24
+ * JRuby 9.2.21.0
25
+ * JRuby 9.4.2.0
21
26
 
22
27
  ## Semver
23
28
 
@@ -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, :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]
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_mv, :de_by_cath, :de_by_augsburg, :de_bb, :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, :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}
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_mv=>:de, :de_by_cath=>:de, :de_by_augsburg=>:de, :de_bb=>: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
@@ -31,7 +31,8 @@ module Holidays
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
- {:function => "may_pub_hol_sa(year)", :function_arguments => [:year], :name => "May Public Holiday", :regions => [:au_sa]}],
34
+ {:function => "may_pub_hol_sa(year)", :function_arguments => [:year], :name => "May Public Holiday", :regions => [:au_sa]},
35
+ {:mday => 27, :function => "to_nearest_monday_after(date)", :function_arguments => [:date], :year_ranges => { :from => 2018 },:name => "Reconciliation Day", :regions => [:au_act]}],
35
36
  6 => [{:wday => 1, :week => 1, :name => "Western Australia Day", :regions => [:au_wa]},
36
37
  {:wday => 1, :week => 2, :name => "Queen's Birthday", :regions => [:au_act, :au_nsw, :au_sa, :au_tas, :au_nt, :au_vic]},
37
38
  {:function => "qld_queens_birthday_june(year)", :function_arguments => [:year], :name => "Queen's Birthday", :regions => [:au_qld]},
@@ -40,7 +41,7 @@ module Holidays
40
41
  8 => [{:function => "qld_brisbane_ekka_holiday(year)", :function_arguments => [:year], :name => "Ekka", :regions => [:au_qld_brisbane]}],
41
42
  9 => [{:mday => 22, :year_ranges => { :limited => [2022] },:name => "National Day of Mourning for Her Majesty Queen Elizabeth II", :regions => [:au]},
42
43
  {:wday => 1, :week => -1, :name => "Queen's Birthday", :regions => [:au_wa]},
43
- {:wday => 1, :week => -1, :name => "Family & Community Day", :regions => [:au_act]}],
44
+ {:wday => 1, :week => -1, :year_ranges => { :until => 2017 },:name => "Family & Community Day", :regions => [:au_act]}],
44
45
  10 => [{:function => "afl_grand_final(year)", :function_arguments => [:year], :name => "Friday before the AFL Grand Final", :regions => [:au_vic]},
45
46
  {:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_act, :au_nsw, :au_sa]},
46
47
  {:function => "qld_labour_day_october(year)", :function_arguments => [:year], :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Labour Day", :regions => [:au_qld]},
@@ -140,6 +141,24 @@ else
140
141
  end
141
142
  },
142
143
 
144
+ "to_nearest_monday_after(date)" => Proc.new { |date|
145
+ case date.wday
146
+ when 6
147
+ date += 2
148
+ when 5
149
+ date += 3
150
+ when 4
151
+ date += 4
152
+ when 3
153
+ date += 5
154
+ when 2
155
+ date += 6
156
+ when 0
157
+ date += 1
158
+ end
159
+ date
160
+ },
161
+
143
162
 
144
163
  }
145
164
  end
@@ -53,7 +53,8 @@ module Holidays
53
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
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
+ {:mday => 30, :year_ranges => { :from => 2021 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "National Day for Truth and Reconciliation", :regions => [:ca_bc, :ca_nt, :ca_pe, :ca_yt]},
57
+ {:mday => 30, :year_ranges => { :from => 2021 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "National Day for Truth and Reconciliation", :regions => [:ca_ab, :ca_mb, :ca_nu]}],
57
58
  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]},
58
59
  {:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
59
60
  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]}],
@@ -7,7 +7,7 @@ module Holidays
7
7
  # All the definitions are available at https://github.com/holidays/holidays
8
8
  module DE # :nodoc:
9
9
  def self.defined_regions
10
- [: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]
10
+ [: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_mv, :de_by_cath, :de_by_augsburg, :de_bb, :de_th, :de_hb, :de_hh, :de_ni, :de_sh]
11
11
  end
12
12
 
13
13
  def self.holidays_by_month
@@ -24,12 +24,14 @@ 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, :year_ranges => { :from => 2019 },:name => "Internationaler Frauentag", :regions => [:de_be]}],
27
+ 3 => [{:mday => 8, :year_ranges => { :from => 2019 },:name => "Internationaler Frauentag", :regions => [:de_be]},
28
+ {:mday => 8, :year_ranges => { :from => 2023 },:name => "Internationaler Frauentag", :regions => [:de_mv]}],
28
29
  5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
29
30
  {:mday => 8, :year_ranges => { :limited => [2020] },:name => "Tag der Befreiung", :regions => [:de_be]}],
31
+ 6 => [{:mday => 17, :year_ranges => { :between => 1954..1990 },:name => "Tag der Deutschen Einheit", :regions => [:de]}],
30
32
  8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by_cath, :de_by_augsburg, :de_sl]},
31
33
  {:mday => 8, :name => "Friedensfest", :regions => [:de_by_augsburg]}],
32
- 10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
34
+ 10 => [{:mday => 3, :year_ranges => { :from => 1990 },:name => "Tag der Deutschen Einheit", :regions => [:de]},
33
35
  {:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
34
36
  {:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
35
37
  {:mday => 31, :year_ranges => { :limited => [2017] },:name => "Reformationstag", :regions => [:de]},
@@ -18,7 +18,7 @@ module Holidays
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Langfredag", :regions => [:dk]},
19
19
  {:function => "easter(year)", :function_arguments => [:year], :name => "Påskedag", :regions => [:dk]},
20
20
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "2. påskedag", :regions => [:dk]},
21
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :name => "Store Bededag", :regions => [:dk]},
21
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :year_ranges => { :until => 2023 },:name => "Store Bededag", :regions => [:dk]},
22
22
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Kristi Himmelfartsdag", :regions => [:dk]},
23
23
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Pinsedag", :regions => [:dk]},
24
24
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "2. Pinsedag", :regions => [:dk]}],
@@ -7,7 +7,7 @@ module Holidays
7
7
  # All the definitions are available at https://github.com/holidays/holidays
8
8
  module EUROPE # :nodoc:
9
9
  def self.defined_regions
10
- [:at, :be_fr, :be_nl, :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, :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, :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, :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, :hr, :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, :li, :lt, :lv, :nl, :no, :pl, :pt, :pt_li, :pt_po, :ro, :sk, :si, :bg_en, :bg_bg, :ua]
10
+ [:at, :be_fr, :be_nl, :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, :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_mv, :de_by_cath, :de_by_augsburg, :de_bb, :de_th, :de_hb, :de_hh, :de_ni, :de_sh, :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, :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, :hr, :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, :li, :lt, :lv, :nl, :no, :pl, :pt, :pt_li, :pt_po, :ro, :sk, :si, :bg_en, :bg_bg, :ua]
11
11
  end
12
12
 
13
13
  def self.holidays_by_month
@@ -41,7 +41,7 @@ module Holidays
41
41
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Langfredag", :regions => [:dk]},
42
42
  {:function => "easter(year)", :function_arguments => [:year], :name => "Påskedag", :regions => [:dk]},
43
43
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "2. påskedag", :regions => [:dk]},
44
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :name => "Store Bededag", :regions => [:dk]},
44
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :year_ranges => { :until => 2023 },:name => "Store Bededag", :regions => [:dk]},
45
45
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Kristi Himmelfartsdag", :regions => [:dk]},
46
46
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Pinsedag", :regions => [:dk]},
47
47
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "2. Pinsedag", :regions => [:dk]},
@@ -69,8 +69,8 @@ module Holidays
69
69
  {:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pâques", :regions => [:fr]},
70
70
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lundi de Pâques", :regions => [:fr]},
71
71
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Ascension", :regions => [:fr]},
72
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :type => :informal, :name => "Pentecôte", :regions => [:fr]},
73
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lundi de Pentecôte", :regions => [:fr]},
72
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Pentecôte", :regions => [:fr]},
73
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :type => :informal, :name => "Lundi de Pentecôte", :regions => [:fr]},
74
74
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -21, :type => :informal, :name => "Mothering Sunday", :regions => [:gb]},
75
75
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:gb]},
76
76
  {:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:gb]},
@@ -227,6 +227,7 @@ module Holidays
227
227
  {:mday => 8, :name => "Victoire 1945", :regions => [:fr]},
228
228
  {:wday => 1, :week => 1, :year_ranges => { :until => 2019 },:name => "May Day", :regions => [:gb]},
229
229
  {:mday => 8, :year_ranges => { :limited => [2020] },:name => "May Day", :regions => [:gb]},
230
+ {:mday => 8, :year_ranges => { :limited => [2023] },:name => "Bank Holiday for the Coronation of King Charles III", :regions => [:gb, :gb]},
230
231
  {:wday => 1, :week => 1, :year_ranges => { :from => 2021 },:name => "May Day", :regions => [:gb]},
231
232
  {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
232
233
  {:wday => 1, :week => -1, :year_ranges => { :until => 2021 },:name => "Bank Holiday", :regions => [:gb]},
@@ -244,6 +245,7 @@ module Holidays
244
245
  {:mday => 1, :name => "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", :regions => [:lv]},
245
246
  {:mday => 4, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Latvijas Republikas Neatkarības atjaunošanas diena", :regions => [:lv]},
246
247
  {:wday => 0, :week => 2, :name => "Mātes diena", :regions => [:lv]},
248
+ {:mday => 29, :year_ranges => { :limited => [2023] },:name => "Diena, kad Latvijas hokeja komanda ieguva bronzas medaļu 2023. gada Pasaules hokeja čempionātā", :regions => [:lv]},
247
249
  {:mday => 4, :type => :informal, :name => "Dodenherdenking", :regions => [:nl]},
248
250
  {:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
249
251
  {:mday => 1, :name => "1. mai", :regions => [:no]},
@@ -295,7 +297,7 @@ module Holidays
295
297
  {:mday => 24, :year_ranges => { :from => 1992 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "День Незалежності", :regions => [:ua]}],
296
298
  10 => [{:mday => 26, :name => "Nationalfeiertag", :regions => [:at]},
297
299
  {:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]},
298
- {:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
300
+ {:mday => 3, :year_ranges => { :from => 1990 },:name => "Tag der Deutschen Einheit", :regions => [:de]},
299
301
  {:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
300
302
  {:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
301
303
  {:mday => 31, :year_ranges => { :limited => [2017] },:name => "Reformationstag", :regions => [:de]},
@@ -448,6 +450,7 @@ module Holidays
448
450
  3 => [{:mday => 1, :name => "Instauration de la République", :regions => [:ch_ne]},
449
451
  {:mday => 19, :name => "Josephstag", :regions => [:ch_ur, :ch_sz, :ch_nw, :ch_ti, :ch_vs]},
450
452
  {:mday => 8, :year_ranges => { :from => 2019 },:name => "Internationaler Frauentag", :regions => [:de_be]},
453
+ {:mday => 8, :year_ranges => { :from => 2023 },:name => "Internationaler Frauentag", :regions => [:de_mv]},
451
454
  {:mday => 25, :name => "Επέτειος της Επανάστασης του 1821", :regions => [:el]},
452
455
  {:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de las Islas Baleares", :regions => [:es_ib]},
453
456
  {:mday => 19, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]},
@@ -482,6 +485,7 @@ module Holidays
482
485
  {:mday => 5, :type => :informal, :name => "Grundlovsdag", :regions => [:dk]},
483
486
  {:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
484
487
  {:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
488
+ {:mday => 17, :year_ranges => { :between => 1954..1990 },:name => "Tag der Deutschen Einheit", :regions => [:de]},
485
489
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Región de Murcia", :regions => [:es_mu]},
486
490
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]},
487
491
  {:mday => 24, :name => "San Juan", :regions => [:es_ct, :es_vc]},
@@ -16,8 +16,8 @@ module Holidays
16
16
  {:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pâques", :regions => [:fr]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lundi de Pâques", :regions => [:fr]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Ascension", :regions => [:fr]},
19
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :type => :informal, :name => "Pentecôte", :regions => [:fr]},
20
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lundi de Pentecôte", :regions => [:fr]}],
19
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Pentecôte", :regions => [:fr]},
20
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :type => :informal, :name => "Lundi de Pentecôte", :regions => [:fr]}],
21
21
  1 => [{:mday => 1, :name => "Jour de l'an", :regions => [:fr]}],
22
22
  5 => [{:mday => 1, :name => "Fête du travail", :regions => [:fr]},
23
23
  {:mday => 8, :name => "Victoire 1945", :regions => [:fr]}],
@@ -22,6 +22,7 @@ module Holidays
22
22
  {:mday => 17, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "St. Patrick's Day", :regions => [:gb_nir]}],
23
23
  5 => [{:wday => 1, :week => 1, :year_ranges => { :until => 2019 },:name => "May Day", :regions => [:gb]},
24
24
  {:mday => 8, :year_ranges => { :limited => [2020] },:name => "May Day", :regions => [:gb]},
25
+ {:mday => 8, :year_ranges => { :limited => [2023] },:name => "Bank Holiday for the Coronation of King Charles III", :regions => [:gb, :gb]},
25
26
  {:wday => 1, :week => 1, :year_ranges => { :from => 2021 },:name => "May Day", :regions => [:gb]},
26
27
  {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
27
28
  {:wday => 1, :week => -1, :year_ranges => { :until => 2021 },:name => "Bank Holiday", :regions => [:gb]},
@@ -20,7 +20,8 @@ module Holidays
20
20
  1 => [{:mday => 1, :name => "Jaungada diena", :regions => [:lv]}],
21
21
  5 => [{:mday => 1, :name => "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", :regions => [:lv]},
22
22
  {:mday => 4, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Latvijas Republikas Neatkarības atjaunošanas diena", :regions => [:lv]},
23
- {:wday => 0, :week => 2, :name => "Mātes diena", :regions => [:lv]}],
23
+ {:wday => 0, :week => 2, :name => "Mātes diena", :regions => [:lv]},
24
+ {:mday => 29, :year_ranges => { :limited => [2023] },:name => "Diena, kad Latvijas hokeja komanda ieguva bronzas medaļu 2023. gada Pasaules hokeja čempionātā", :regions => [:lv]}],
24
25
  6 => [{:mday => 23, :name => "Līgo diena", :regions => [:lv]},
25
26
  {:mday => 24, :name => "Jāņu diena", :regions => [:lv]}],
26
27
  9 => [{:mday => 24, :year_ranges => { :limited => [2018] },:name => "Viņa Svētības pāvesta Franciska pastorālās vizītes Latvijā diena", :regions => [:lv]}],
@@ -99,7 +99,8 @@ module Holidays
99
99
  {:wday => 5, :week => 3, :name => "Statehood Day", :regions => [:us_hi]},
100
100
  {:mday => 27, :name => "Lyndon Baines Johnson Day", :regions => [:us_tx]}],
101
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]},
102
+ {:mday => 30, :year_ranges => { :from => 2021 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "National Day for Truth and Reconciliation", :regions => [:ca_bc, :ca_nt, :ca_pe, :ca_yt]},
103
+ {:mday => 30, :year_ranges => { :from => 2021 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "National Day for Truth and Reconciliation", :regions => [:ca_ab, :ca_mb, :ca_nu]},
103
104
  {:mday => 15, :type => :informal, :name => "Grito de Dolores", :regions => [:mx]},
104
105
  {:mday => 16, :name => "Día de la Independencia", :regions => [:mx]},
105
106
  {:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]},
@@ -18,7 +18,7 @@ module Holidays
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Langfredag", :regions => [:dk]},
19
19
  {:function => "easter(year)", :function_arguments => [:year], :name => "Påskedag", :regions => [:dk]},
20
20
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "2. påskedag", :regions => [:dk]},
21
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :name => "Store Bededag", :regions => [:dk]},
21
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :year_ranges => { :until => 2023 },:name => "Store Bededag", :regions => [:dk]},
22
22
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Kristi Himmelfartsdag", :regions => [:dk]},
23
23
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Pinsedag", :regions => [:dk]},
24
24
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "2. Pinsedag", :regions => [:dk]},
@@ -83,6 +83,7 @@ module Holidays
83
83
 
84
84
  def custom_holiday(year, month, h)
85
85
  @custom_method_processor.call(
86
+ #FIXME This seems like a bug, we seem to expect the day in here in the au defs?
86
87
  build_custom_method_input(year, month, h[:mday], h[:regions]),
87
88
  h[:function], h[:function_arguments], h[:function_modifier],
88
89
  )
@@ -1,3 +1,3 @@
1
1
  module Holidays
2
- VERSION = '8.6.0'
2
+ VERSION = '8.7.1'
3
3
  end
@@ -214,5 +214,9 @@ assert_equal "Queen's Birthday", (Holidays.on(Date.civil(2016, 9, 26), [:au_wa])
214
214
 
215
215
  assert_nil (Holidays.on(Date.civil(2021, 9, 22), [:au])[0] || {})[:name]
216
216
 
217
+ assert_equal "Reconciliation Day", (Holidays.on(Date.civil(2024, 5, 27), [:au_act])[0] || {})[:name]
218
+
219
+ assert_equal "Reconciliation Day", (Holidays.on(Date.civil(2025, 6, 2), [:au_act])[0] || {})[:name]
220
+
217
221
  end
218
222
  end
@@ -201,9 +201,17 @@ 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 "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca])[0] || {})[:name]
204
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca_bc, :ca_nt, :ca_pe, :ca_yt])[0] || {})[:name]
205
205
 
206
- assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca])[0] || {})[:name]
206
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca_ab, :ca_mb, :ca_nu], [:informal])[0] || {})[:name]
207
+
208
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2023, 10, 2), [:ca_bc, :ca_nt, :ca_pe, :ca_yt], [:observed])[0] || {})[:name]
209
+
210
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2023, 10, 2), [:ca_ab, :ca_mb, :ca_nu], [:informal, :observed])[0] || {})[:name]
211
+
212
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca_bc, :ca_nt, :ca_pe, :ca_yt], [:observed])[0] || {})[:name]
213
+
214
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca_ab, :ca_mb, :ca_nu], [:informal, :observed])[0] || {})[:name]
207
215
 
208
216
  assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
209
217
 
@@ -79,6 +79,8 @@ class DeDefinitionTests < Test::Unit::TestCase # :nodoc:
79
79
 
80
80
  assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2019, 3, 8), [:de_be])[0] || {})[:name]
81
81
 
82
+ assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2023, 3, 8), [:de_mv])[0] || {})[:name]
83
+
82
84
  assert_equal "Tag der Befreiung", (Holidays.on(Date.civil(2020, 5, 8), [:de_be])[0] || {})[:name]
83
85
 
84
86
  end
@@ -7,6 +7,10 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
7
7
  class DkDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
9
  def test_dk
10
+ assert_equal "Store Bededag", (Holidays.on(Date.civil(2023, 5, 5), [:dk])[0] || {})[:name]
11
+
12
+ assert_nil (Holidays.on(Date.civil(2024, 4, 26), [:dk])[0] || {})[:name]
13
+
10
14
  assert_equal "Nytårsdag", (Holidays.on(Date.civil(2007, 1, 1), [:dk], [:informal])[0] || {})[:name]
11
15
 
12
16
  assert_equal "Fastelavn", (Holidays.on(Date.civil(2007, 2, 18), [:dk], [:informal])[0] || {})[:name]
@@ -161,6 +161,10 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
161
161
 
162
162
  assert_equal "2. svátek vánoční", (Holidays.on(Date.civil(2010, 12, 26), [:cz], [:informal])[0] || {})[:name]
163
163
 
164
+ assert_equal "Store Bededag", (Holidays.on(Date.civil(2023, 5, 5), [:dk])[0] || {})[:name]
165
+
166
+ assert_nil (Holidays.on(Date.civil(2024, 4, 26), [:dk])[0] || {})[:name]
167
+
164
168
  assert_equal "Nytårsdag", (Holidays.on(Date.civil(2007, 1, 1), [:dk], [:informal])[0] || {})[:name]
165
169
 
166
170
  assert_equal "Fastelavn", (Holidays.on(Date.civil(2007, 2, 18), [:dk], [:informal])[0] || {})[:name]
@@ -265,6 +269,8 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
265
269
 
266
270
  assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2019, 3, 8), [:de_be])[0] || {})[:name]
267
271
 
272
+ assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2023, 3, 8), [:de_mv])[0] || {})[:name]
273
+
268
274
  assert_equal "Tag der Befreiung", (Holidays.on(Date.civil(2020, 5, 8), [:de_be])[0] || {})[:name]
269
275
 
270
276
  assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:el], [:informal])[0] || {})[:name]
@@ -433,7 +439,7 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
433
439
 
434
440
  assert_equal "Ascension", (Holidays.on(Date.civil(2007, 5, 17), [:fr])[0] || {})[:name]
435
441
 
436
- assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
442
+ assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
437
443
 
438
444
  assert_equal "Fête nationale", (Holidays.on(Date.civil(2007, 7, 14), [:fr])[0] || {})[:name]
439
445
 
@@ -447,11 +453,11 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
447
453
 
448
454
  assert_nil (Holidays.on(Date.civil(2007, 4, 8), [:fr])[0] || {})[:name]
449
455
 
450
- assert_nil (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
456
+ assert_nil (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
451
457
 
452
458
  assert_equal "Pâques", (Holidays.on(Date.civil(2007, 4, 8), [:fr], [:informal])[0] || {})[:name]
453
459
 
454
- assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr], [:informal])[0] || {})[:name]
460
+ assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr], [:informal])[0] || {})[:name]
455
461
 
456
462
  assert_equal "Saint-Étienne", (Holidays.on(Date.civil(2017, 12, 26), [:fr_a, :fr_m], [:informal])[0] || {})[:name]
457
463
 
@@ -593,8 +599,16 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
593
599
 
594
600
  assert_nil (Holidays.on(Date.civil(2021, 9, 19), [:gb])[0] || {})[:name]
595
601
 
602
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
603
+
604
+ assert_nil (Holidays.on(Date.civil(2024, 5, 8), [:gb])[0] || {})[:name]
605
+
606
+ assert_nil (Holidays.on(Date.civil(2022, 5, 8), [:gb])[0] || {})[:name]
607
+
596
608
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
597
609
 
610
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
611
+
598
612
  assert_equal "Nova godina", (Holidays.on(Date.civil(2012, 1, 1), [:hr], [:informal])[0] || {})[:name]
599
613
 
600
614
  assert_equal "Bogojavljenje ili Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
@@ -899,6 +913,8 @@ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.o
899
913
  assert_equal "Mātes diena", (Holidays.on(Date.civil(2020, 5, 10), [:lv])[0] || {})[:name]
900
914
  assert_equal "Mātes diena", (Holidays.on(Date.civil(2029, 5, 13), [:lv])[0] || {})[:name]
901
915
 
916
+ assert_equal "Diena, kad Latvijas hokeja komanda ieguva bronzas medaļu 2023. gada Pasaules hokeja čempionātā", (Holidays.on(Date.civil(2023, 5, 29), [:lv])[0] || {})[:name]
917
+
902
918
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2019, 6, 9), [:lv])[0] || {})[:name]
903
919
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2020, 5, 31), [:lv])[0] || {})[:name]
904
920
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2029, 5, 20), [:lv])[0] || {})[:name]
@@ -17,7 +17,7 @@ class FrDefinitionTests < Test::Unit::TestCase # :nodoc:
17
17
 
18
18
  assert_equal "Ascension", (Holidays.on(Date.civil(2007, 5, 17), [:fr])[0] || {})[:name]
19
19
 
20
- assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
20
+ assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
21
21
 
22
22
  assert_equal "Fête nationale", (Holidays.on(Date.civil(2007, 7, 14), [:fr])[0] || {})[:name]
23
23
 
@@ -31,11 +31,11 @@ class FrDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_nil (Holidays.on(Date.civil(2007, 4, 8), [:fr])[0] || {})[:name]
33
33
 
34
- assert_nil (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
34
+ assert_nil (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
35
35
 
36
36
  assert_equal "Pâques", (Holidays.on(Date.civil(2007, 4, 8), [:fr], [:informal])[0] || {})[:name]
37
37
 
38
- assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr], [:informal])[0] || {})[:name]
38
+ assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr], [:informal])[0] || {})[:name]
39
39
 
40
40
  assert_equal "Saint-Étienne", (Holidays.on(Date.civil(2017, 12, 26), [:fr_a, :fr_m], [:informal])[0] || {})[:name]
41
41
 
@@ -145,7 +145,15 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
145
145
 
146
146
  assert_nil (Holidays.on(Date.civil(2021, 9, 19), [:gb])[0] || {})[:name]
147
147
 
148
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
149
+
150
+ assert_nil (Holidays.on(Date.civil(2024, 5, 8), [:gb])[0] || {})[:name]
151
+
152
+ assert_nil (Holidays.on(Date.civil(2022, 5, 8), [:gb])[0] || {})[:name]
153
+
148
154
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
149
155
 
156
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
157
+
150
158
  end
151
159
  end
@@ -39,6 +39,8 @@ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.o
39
39
  assert_equal "Mātes diena", (Holidays.on(Date.civil(2020, 5, 10), [:lv])[0] || {})[:name]
40
40
  assert_equal "Mātes diena", (Holidays.on(Date.civil(2029, 5, 13), [:lv])[0] || {})[:name]
41
41
 
42
+ assert_equal "Diena, kad Latvijas hokeja komanda ieguva bronzas medaļu 2023. gada Pasaules hokeja čempionātā", (Holidays.on(Date.civil(2023, 5, 29), [:lv])[0] || {})[:name]
43
+
42
44
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2019, 6, 9), [:lv])[0] || {})[:name]
43
45
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2020, 5, 31), [:lv])[0] || {})[:name]
44
46
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2029, 5, 20), [:lv])[0] || {})[:name]
@@ -201,9 +201,17 @@ 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 "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca])[0] || {})[:name]
204
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca_bc, :ca_nt, :ca_pe, :ca_yt])[0] || {})[:name]
205
205
 
206
- assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca])[0] || {})[:name]
206
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca_ab, :ca_mb, :ca_nu], [:informal])[0] || {})[:name]
207
+
208
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2023, 10, 2), [:ca_bc, :ca_nt, :ca_pe, :ca_yt], [:observed])[0] || {})[:name]
209
+
210
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2023, 10, 2), [:ca_ab, :ca_mb, :ca_nu], [:informal, :observed])[0] || {})[:name]
211
+
212
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca_bc, :ca_nt, :ca_pe, :ca_yt], [:observed])[0] || {})[:name]
213
+
214
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca_ab, :ca_mb, :ca_nu], [:informal, :observed])[0] || {})[:name]
207
215
 
208
216
  assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
209
217
 
@@ -7,6 +7,10 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
7
7
  class ScandinaviaDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
9
  def test_scandinavia
10
+ assert_equal "Store Bededag", (Holidays.on(Date.civil(2023, 5, 5), [:dk])[0] || {})[:name]
11
+
12
+ assert_nil (Holidays.on(Date.civil(2024, 4, 26), [:dk])[0] || {})[:name]
13
+
10
14
  assert_equal "Nytårsdag", (Holidays.on(Date.civil(2007, 1, 1), [:dk], [:informal])[0] || {})[:name]
11
15
 
12
16
  assert_equal "Fastelavn", (Holidays.on(Date.civil(2007, 2, 18), [:dk], [:informal])[0] || {})[:name]
@@ -130,12 +130,6 @@ class HolidaysTests < Test::Unit::TestCase
130
130
  assert_equal 5, holidays.length
131
131
  end
132
132
 
133
- def test_year_holidays_without_specified_year
134
- # Gets holidays for current year from today's date
135
- holidays = Holidays.year_holidays([:de])
136
- assert_equal holidays.first[:date].year, Date.today.year
137
- end
138
-
139
133
  def test_year_holidays_empty
140
134
  # if remain holidays is nothing , method will return empty.
141
135
  holidays = Holidays.year_holidays([:ca_on], Date.civil(2016, 12, 27))
@@ -155,7 +149,7 @@ class HolidaysTests < Test::Unit::TestCase
155
149
  assert_equal 11, holidays.length
156
150
 
157
151
  holidays = Holidays.year_holidays([:ca_on], Date.civil(2050, 1, 1))
158
- assert_equal 10, holidays.length
152
+ assert_equal 9, holidays.length
159
153
 
160
154
  holidays = Holidays.year_holidays([:jp], Date.civil(2070, 1, 1))
161
155
  assert_equal 19, holidays.length
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.6.0
4
+ version: 8.7.1
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: 2022-09-15 00:00:00.000000000 Z
12
+ date: 2023-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -103,6 +103,7 @@ executables: []
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
+ - ".github/workflows/ruby.yml"
106
107
  - ".gitmodules"
107
108
  - CHANGELOG.md
108
109
  - CODE_OF_CONDUCT.md