holidays 8.3.0 → 8.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/holidays.gemspec +1 -1
- data/lib/generated_definitions/MANIFEST +1 -0
- data/lib/generated_definitions/REGIONS.rb +2 -2
- data/lib/generated_definitions/au.rb +7 -1
- data/lib/generated_definitions/jp.rb +8 -3
- data/lib/generated_definitions/kz.rb +38 -0
- data/lib/holidays/version.rb +1 -1
- data/test/defs/test_defs_jp.rb +5 -3
- data/test/defs/test_defs_kz.rb +39 -0
- data/test/integration/test_available_regions.rb +1 -1
- data/test/integration/test_holidays.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c89dde9832991fd0f84d05db793d847067c3098376433be9df47849a2d08144
|
4
|
+
data.tar.gz: e3801bb37130b4b87714a28e5cbda118b45a55064a2ae25210c684b8bc92e1a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbd401c5db3e297a0994e6ec9036fcabf7507107432d7652711862c3c25e807d8b9fcaad380b1e4980e9988c3271ee6a5b27b1c606460e30f4a039166bd42c89
|
7
|
+
data.tar.gz: d20b6fdaaf5718ea2856f90ad886b326a37a19050d027f99163b078d562108484d066677fec92cab6c4188c1544dc938057c64b1ca5d510884e3034e2a5a464c
|
data/CHANGELOG.md
CHANGED
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 = '
|
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
|
@@ -32,7 +32,7 @@ module Holidays
|
|
32
32
|
5 => [{:function => "qld_labour_day_may(year)", :function_arguments => [:year], :name => "Labour Day", :regions => [:au_qld]},
|
33
33
|
{:wday => 1, :week => 1, :name => "May Day", :regions => [:au_nt]},
|
34
34
|
{:function => "may_pub_hol_sa(year)", :function_arguments => [:year], :name => "May Public Holiday", :regions => [:au_sa]}],
|
35
|
-
6 => [{:wday => 1, :week => 1, :name => "
|
35
|
+
6 => [{:wday => 1, :week => 1, :name => "Western Australia Day", :regions => [:au_wa]},
|
36
36
|
{:wday => 1, :week => 2, :name => "Queen's Birthday", :regions => [:au_act, :au_nsw, :au_sa, :au_tas, :au_nt, :au_vic]},
|
37
37
|
{:function => "qld_queens_birthday_june(year)", :function_arguments => [:year], :name => "Queen's Birthday", :regions => [:au_qld]},
|
38
38
|
{:mday => 6, :type => :informal, :name => "Queensland Day", :regions => [:au_qld]}],
|
@@ -66,6 +66,12 @@ when 2016
|
|
66
66
|
Date.civil(2016, 9, 30)
|
67
67
|
when 2017
|
68
68
|
Date.civil(2017, 9, 29)
|
69
|
+
when 2018
|
70
|
+
Date.civil(2018, 9, 28)
|
71
|
+
when 2019
|
72
|
+
Date.civil(2019,9, 27)
|
73
|
+
when 2020
|
74
|
+
Date.civil(2020, 10, 23)
|
69
75
|
end
|
70
76
|
},
|
71
77
|
|
@@ -35,13 +35,18 @@ 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
|
-
{:
|
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
|
-
{:
|
44
|
-
{:function => "
|
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]},
|
@@ -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
|
data/lib/holidays/version.rb
CHANGED
data/test/defs/test_defs_jp.rb
CHANGED
@@ -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,
|
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,
|
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,
|
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
|
@@ -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
|
21
|
+
assert_equal 258, Holidays.available_regions.count
|
22
22
|
end
|
23
23
|
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.
|
4
|
+
version: 8.4.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-
|
12
|
+
date: 2020-12-24 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
|
@@ -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
|