holidays 11.2.0 → 11.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/generated_definitions/MANIFEST +1 -0
- data/lib/generated_definitions/REGIONS.rb +3 -3
- data/lib/generated_definitions/by.rb +41 -0
- data/lib/generated_definitions/co.rb +9 -78
- data/lib/generated_definitions/es.rb +1 -1
- data/lib/generated_definitions/europe.rb +15 -1
- data/lib/generated_definitions/ie.rb +11 -1
- data/lib/generated_definitions/northamerica.rb +22 -1
- data/lib/generated_definitions/pe.rb +11 -7
- data/lib/generated_definitions/sk.rb +6 -2
- data/lib/generated_definitions/southamerica.rb +17 -82
- data/lib/generated_definitions/us.rb +22 -1
- data/lib/holidays/definition/context/function_processor.rb +11 -22
- data/lib/holidays/finder/context/search.rb +4 -1
- data/lib/holidays/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f00af068aa49592884036b34ae05aa67cc7af97eb91ee75d6fb1ac93038eef6
|
|
4
|
+
data.tar.gz: ffc67f47f6c45f29d1b4196c08f8e7f39eb5b1beeb5b5d41a2d906f60779cf71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8d811d889e05c5d0f743687e06457efa36d163e284a95adfc82b4807942558e704316bdd9c113266db41fe10e1246eb8e1de5234dabb5dd2f457b55f83dd6b1
|
|
7
|
+
data.tar.gz: 4c1d6716cbbc0b77d1f7f2c94bc1b7a38ca18ea0f9b1b6bdd9f28547ae8a53d798b164ad584a343c3d857f2ffc6632f150560d9a04ecc7ff614af79d2b59cfc0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Ruby Holidays Gem CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 11.4.0
|
|
4
|
+
|
|
5
|
+
* Update to [v8.2.0 definitions](https://github.com/holidays/definitions/releases/tag/v8.2.0). Please see the changelog for the definition details.
|
|
6
|
+
|
|
7
|
+
## 11.3.0
|
|
8
|
+
|
|
9
|
+
* Update to [v8.1.0 definitions](https://github.com/holidays/definitions/releases/tag/v8.1.0). Please see the changelog for the definition details.
|
|
10
|
+
* Pass a custom method's declared arguments to `observed` methods, and supply all custom method arguments in the order the definition declares them ([#433](https://github.com/holidays/holidays/issues/433)). Previously `observed` methods only ever received `date`, and arguments were supplied in a fixed order regardless of the declared order, so a definition declaring anything else bound values to the wrong parameters.
|
|
11
|
+
* Add `us_ut` Juneteenth observance, observed on June 19 when that is a Monday, the preceding Monday when June 19 is Tuesday through Friday, and the following Monday when it is a weekend. Callers querying `us_ut` with the `:observed` option will see a different date from the rest of `us`.
|
|
12
|
+
* Add `ie` St Brigid's Day, the first Monday in February or 1 February when that day is a Friday, a public holiday from 2023
|
|
13
|
+
* Restore `sk` Deň Ústavy Slovenskej republiky and Deň boja za slobodu a demokraciu, which remain state holidays in Slovak law. Both are formal up to the year each stopped being a day of rest, 2024 and 2025 respectively, and informal from then on, so they no longer appear in default results for those later years
|
|
14
|
+
|
|
3
15
|
## 11.2.0
|
|
4
16
|
|
|
5
17
|
* Update to [v8.0.2 definitions](https://github.com/holidays/definitions/releases/tag/v8.0.2). Please see the changelog for the definition details.
|
|
@@ -9,6 +9,7 @@ The following definition files are included in this installation:
|
|
|
9
9
|
* generated_definitions/be_nl
|
|
10
10
|
* generated_definitions/bg
|
|
11
11
|
* generated_definitions/br
|
|
12
|
+
* generated_definitions/by
|
|
12
13
|
* generated_definitions/ca
|
|
13
14
|
* generated_definitions/ch
|
|
14
15
|
* generated_definitions/cl
|
|
@@ -1,8 +1,8 @@
|
|
|
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, :cy, :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_th, :de_bb, :de_hb, :de_hh, :de_ni, :de_sh, :ecbtarget, :ee, :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, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :im, :gb_iom, :ge, :gr, :hr, :hk, :hu, :ie, :il, :in, :in_wb, :in_od, :in_tr, :in_mh, :in_ar, :in_mz, :in_br, :in_hp, :in_gj, :in_sk, :in_ts, :in_jh, :in_py, :in_kl, :in_ka, :in_jk, :in_ap, :in_cg, :in_hr, :in_mp, :in_pb, :in_nl, :in_as, :in_ga, :is, :it, :it_ve, :it_tv, :it_vr, :it_pd, :it_fi, :it_ge, :it_to, :it_rm, :it_vi, :it_bl, :it_ro, :ke, :kr, :kz, :li, :lt, :lv, :ma, :mc, :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, :tsx, :ua, :us_fl, :us_al, :us_la, :us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_nj, :us_nc, :us_nd, :us_pa, :us_pr, :us_tn, :us_ga, :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_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_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, :vn, :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, :by, :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, :cy, :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_th, :de_bb, :de_hb, :de_hh, :de_ni, :de_sh, :ecbtarget, :ee, :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, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :im, :gb_iom, :ge, :gr, :hr, :hk, :hu, :ie, :il, :in, :in_wb, :in_od, :in_tr, :in_mh, :in_ar, :in_mz, :in_br, :in_hp, :in_gj, :in_sk, :in_ts, :in_jh, :in_py, :in_kl, :in_ka, :in_jk, :in_ap, :in_cg, :in_hr, :in_mp, :in_pb, :in_nl, :in_as, :in_ga, :is, :it, :it_ve, :it_tv, :it_vr, :it_pd, :it_fi, :it_ge, :it_to, :it_rm, :it_vi, :it_bl, :it_ro, :ke, :kr, :kz, :li, :lt, :lv, :ma, :mc, :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, :tsx, :ua, :us_fl, :us_al, :us_la, :us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_nj, :us_nc, :us_nd, :us_pa, :us_pr, :us_tn, :us_ga, :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_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_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, :vn, :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, cy: :cy, 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_th: :de, de_bb: :de, de_hb: :de, de_hh: :de, de_ni: :de, de_sh: :de, ecbtarget: :ecbtarget, ee: :ee, 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, gb_con: :gb, je: :gb, gb_jsy: :gb, gg: :gb, gb_gsy: :gb, gb_sct: :gb, im: :gb, gb_iom: :gb, ge: :ge, gr: :gr, hr: :hr, hk: :hk, hu: :hu, ie: :ie, il: :il, in: :in, in_wb: :in, in_od: :in, in_tr: :in, in_mh: :in, in_ar: :in, in_mz: :in, in_br: :in, in_hp: :in, in_gj: :in, in_sk: :in, in_ts: :in, in_jh: :in, in_py: :in, in_kl: :in, in_ka: :in, in_jk: :in, in_ap: :in, in_cg: :in, in_hr: :in, in_mp: :in, in_pb: :in, in_nl: :in, in_as: :in, in_ga: :in, 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, ke: :ke, kr: :kr, kz: :kz, li: :li, lt: :lt, lv: :lv, ma: :ma, mc: :mc, 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, tsx: :tsx, ua: :ua, us_fl: :us, us_al: :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_pa: :us, us_pr: :us, us_tn: :us, us_ga: :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_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_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, vn: :vn, 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, by: :by, 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, cy: :cy, 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_th: :de, de_bb: :de, de_hb: :de, de_hh: :de, de_ni: :de, de_sh: :de, ecbtarget: :ecbtarget, ee: :ee, 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, gb_con: :gb, je: :gb, gb_jsy: :gb, gg: :gb, gb_gsy: :gb, gb_sct: :gb, im: :gb, gb_iom: :gb, ge: :ge, gr: :gr, hr: :hr, hk: :hk, hu: :hu, ie: :ie, il: :il, in: :in, in_wb: :in, in_od: :in, in_tr: :in, in_mh: :in, in_ar: :in, in_mz: :in, in_br: :in, in_hp: :in, in_gj: :in, in_sk: :in, in_ts: :in, in_jh: :in, in_py: :in, in_kl: :in, in_ka: :in, in_jk: :in, in_ap: :in, in_cg: :in, in_hr: :in, in_mp: :in, in_pb: :in, in_nl: :in, in_as: :in, in_ga: :in, 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, ke: :ke, kr: :kr, kz: :kz, li: :li, lt: :lt, lv: :lv, ma: :ma, mc: :mc, 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, tsx: :tsx, ua: :ua, us_fl: :us, us_al: :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_pa: :us, us_pr: :us, us_tn: :us, us_ga: :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_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_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, vn: :vn, sg: :sg, my: :my, th: :th, ng: :ng}
|
|
6
6
|
|
|
7
|
-
REGION_NAMES = {:ar => "Argentina", :at => "Austria", :au => "Australia", :au_act => "Australian Capital Territory", :au_nsw => "New South Wales", :au_nt => "Northern Territory", :au_qld => "Queensland", :au_qld_brisbane => "Brisbane", :au_qld_cairns => "Cairns", :au_sa => "South Australia", :au_tas => "Tasmania", :au_tas_north => "Northern Tasmania", :au_tas_south => "Southern Tasmania", :au_vic => "Victoria", :au_vic_melbourne => "Melbourne", :au_wa => "Western Australia", :be_fr => "Belgium (French)", :be_nl => "Belgium (Dutch)", :br => "Brazil", :bg_bg => "Bulgaria", :bg_en => "Bulgaria", :ca => "Canada", :ca_ab => "Alberta", :ca_bc => "British Columbia", :ca_mb => "Manitoba", :ca_nb => "New Brunswick", :ca_nl => "Newfoundland and Labrador", :ca_ns => "Nova Scotia", :ca_nt => "Northwest Territories", :ca_nu => "Nunavut", :ca_on => "Ontario", :ca_pe => "Prince Edward Island", :ca_qc => "Quebec", :ca_sk => "Saskatchewan", :ca_yt => "Yukon", :us => "United States", :ch => "Switzerland", :ch_ag => "Aargau", :ch_ai => "Appenzell Innerrhoden", :ch_ar => "Appenzell Ausserrhoden", :ch_be => "Bern", :ch_bl => "Basel-Landschaft", :ch_bs => "Basel-Stadt", :ch_fr => "Fribourg", :ch_ge => "Genève", :ch_gl => "Glarus", :ch_gr => "Graubünden", :ch_ju => "Jura", :ch_lu => "Luzern", :ch_ne => "Neuchâtel", :ch_nw => "Nidwalden", :ch_ow => "Obwalden", :ch_sg => "Sankt Gallen", :ch_sh => "Schaffhausen", :ch_so => "Solothurn", :ch_sz => "Schwyz", :ch_tg => "Thurgau", :ch_ti => "Ticino", :ch_ur => "Uri", :ch_vd => "Vaud", :ch_vs => "Valais", :ch_zg => "Zug", :ch_zh => "Zürich", :cl => "Chile", :co => "Colombia", :cr => "Costa Rica", :cy => "Cyprus", :cz => "Czechia", :dk => "Denmark", :de => "Germany", :de_bb => "Brandenburg", :de_be => "Berlin", :de_bw => "Baden-Württemberg", :de_by => "Bayern", :de_by_augsburg => "Augsburg (Bayern)", :de_by_cath => "Bayern (Catholic regions)", :de_hb => "Bremen", :de_he => "Hessen", :de_hh => "Hamburg", :de_mv => "Mecklenburg-Vorpommern", :de_ni => "Niedersachsen", :de_nw => "Nordrhein-Westfalen", :de_rp => "Rheinland-Pfalz", :de_sh => "Schleswig-Holstein", :de_sl => "Saarland", :de_sn => "Sachsen", :de_sn_sorbian => "Sachsen (Sorbian regions)", :de_st => "Sachsen-Anhalt", :de_th => "Thüringen", :de_th_cath => "Thüringen (Catholic regions)", :ecbtarget => "ECB TARGET (European Central Bank)", :ee => "Estonia", :es => "Spain", :es_an => "Andalucía", :es_ar => "Aragón", :es_ce => "Ceuta", :es_cl => "Castilla y León", :es_cm => "Castilla-La Mancha", :es_cn => "Canary Islands", :es_ct => "Cataluña", :es_ex => "Extremadura", :es_ga => "Galicia", :es_ib => "Islas Baleares", :es_lo => "Rioja, La", :es_m => "Madrid", :es_mu => "Murcia", :es_na => "Navarra", :es_o => "Asturias", :es_pv => "País Vasco", :es_v => "Valencia/València", :es_vc => "Comunidad Valenciana", :federalreserve => "Federal Reserve", :federalreservebanks => "Federal Reserve Banks", :fedex => "FedEx", :fi => "Finland", :fr => "France", :fr_a => "Alsace", :fr_m => "Moselle", :gb => "United Kingdom", :gb_con => "Cornwall", :gb_eaw => "England and Wales", :gb_eng => "England", :gb_gsy => "Guernsey", :gb_iom => "Isle of Man", :gb_jsy => "Jersey", :gb_nir => "Northern Ireland", :gb_sct => "Scotland", :gb_wls => "Wales", :gg => "Guernsey", :im => "Isle of Man", :je => "Jersey", :ge => "Georgia", :gr => "Greece", :hr => "Croatia", :hk => "Hong Kong", :hu => "Hungary", :ie => "Ireland", :il => "Israel", :in => "India", :in_ap => "Andhra Pradesh", :in_ar => "Arunachal Pradesh", :in_as => "Assam", :in_br => "Bihar", :in_cg => "Chhattisgarh", :in_ga => "Goa", :in_gj => "Gujarat", :in_hp => "Himachal Pradesh", :in_hr => "Haryana", :in_jh => "Jharkhand", :in_jk => "Jammu and Kashmir", :in_ka => "Karnataka", :in_kl => "Kerala", :in_mh => "Maharashtra", :in_mp => "Madhya Pradesh", :in_mz => "Mizoram", :in_nl => "Nagaland", :in_od => "Odisha", :in_pb => "Punjab", :in_py => "Pondicherry", :in_sk => "Sikkim", :in_tr => "Tripura", :in_ts => "तेलंगाना", :in_wb => "West Bengal", :is => "Iceland", :it => "Italy", :it_bl => "Belluno", :it_fi => "Firenze", :it_ge => "Genova", :it_pd => "Padova", :it_rm => "Roma", :it_ro => "Rovigo", :it_to => "Torino", :it_tv => "Treviso", :it_ve => "Venezia", :it_vi => "Vicenza", :it_vr => "Verona", :ke => "Kenya", :kr => "South Korea", :kz => "Kazakhstan", :li => "Liechtenstein", :lt => "Lithuania", :lv => "Latvia", :ma => "Morocco", :mc => "Monaco", :mt_mt => "Malta", :mt_en => "Malta", :mx => "Mexico", :mx_pue => "Puebla", :nerc => "North American Electric Reliability Corporation", :nl => "Netherlands", :lu => "Luxembourg", :no => "Norway", :nyse => "New York Stock Exchange", :nz => "New Zealand", :nz_ak => "Auckland", :nz_ca => "Canterbury", :nz_ch => "Chatham Islands", :nz_hb => "Hawke's Bay", :nz_mb => "Marlborough", :nz_ne => "Nelson", :nz_nl => "Northland", :nz_ot => "Otago", :nz_sc => "South Canterbury", :nz_sl => "Southland", :nz_ta => "Taranaki", :nz_we => "Wellington", :nz_wl => "Westland", :pe => "Peru", :ph => "Philippines", :pl => "Poland", :pt => "Portugal", :pt_li => "Lisbon", :pt_po => "Porto", :ro => "Romania", :rs_cyrl => "Serbia", :rs_la => "Serbia", :ru => "Russian Federation", :se => "Sweden", :tn => "Tunisia", :tr => "Türkiye", :tsx => "Toronto Stock Exchange", :ua => "Ukraine", :us_ak => "Alaska", :us_al => "Alabama", :us_ar => "Arkansas", :us_az => "Arizona", :us_ca => "California", :us_co => "Colorado", :us_ct => "Connecticut", :us_dc => "District of Columbia", :us_de => "Delaware", :us_fl => "Florida", :us_ga => "Georgia", :us_gu => "Guam", :us_hi => "Hawaii", :us_ia => "Iowa", :us_id => "Idaho", :us_il => "Illinois", :us_in => "Indiana", :us_ks => "Kansas", :us_ky => "Kentucky", :us_la => "Louisiana", :us_ma => "Massachusetts", :us_md => "Maryland", :us_me => "Maine", :us_mi => "Michigan", :us_mn => "Minnesota", :us_mo => "Missouri", :us_ms => "Mississippi", :us_mt => "Montana", :us_nc => "North Carolina", :us_nd => "North Dakota", :us_ne => "Nebraska", :us_nh => "New Hampshire", :us_nj => "New Jersey", :us_nm => "New Mexico", :us_nv => "Nevada", :us_ny => "New York", :us_oh => "Ohio", :us_ok => "Oklahoma", :us_or => "Oregon", :us_pa => "Pennsylvania", :us_pr => "Puerto Rico", :us_ri => "Rhode Island", :us_sc => "South Carolina", :us_sd => "South Dakota", :us_tn => "Tennessee", :us_tx => "Texas", :us_ut => "Utah", :us_va => "Virginia", :us_vi => "Virgin Islands, U.S.", :us_vt => "Vermont", :us_wa => "Washington", :us_wi => "Wisconsin", :us_wv => "West Virginia", :us_wy => "Wyoming", :unitednations => "United Nations", :ups => "UPS", :za => "South Africa", :ve => "Venezuela", :sk => "Slovakia", :si => "Slovenia", :jp => "Japan", :vn => "Vietnam", :sg => "Singapore", :my => "Malaysia", :th => "Thailand", :ng => "Nigeria"}
|
|
7
|
+
REGION_NAMES = {:ar => "Argentina", :at => "Austria", :au => "Australia", :au_act => "Australian Capital Territory", :au_nsw => "New South Wales", :au_nt => "Northern Territory", :au_qld => "Queensland", :au_qld_brisbane => "Brisbane", :au_qld_cairns => "Cairns", :au_sa => "South Australia", :au_tas => "Tasmania", :au_tas_north => "Northern Tasmania", :au_tas_south => "Southern Tasmania", :au_vic => "Victoria", :au_vic_melbourne => "Melbourne", :au_wa => "Western Australia", :be_fr => "Belgium (French)", :be_nl => "Belgium (Dutch)", :br => "Brazil", :bg_bg => "Bulgaria", :bg_en => "Bulgaria", :by => "Belarus", :ca => "Canada", :ca_ab => "Alberta", :ca_bc => "British Columbia", :ca_mb => "Manitoba", :ca_nb => "New Brunswick", :ca_nl => "Newfoundland and Labrador", :ca_ns => "Nova Scotia", :ca_nt => "Northwest Territories", :ca_nu => "Nunavut", :ca_on => "Ontario", :ca_pe => "Prince Edward Island", :ca_qc => "Quebec", :ca_sk => "Saskatchewan", :ca_yt => "Yukon", :us => "United States", :ch => "Switzerland", :ch_ag => "Aargau", :ch_ai => "Appenzell Innerrhoden", :ch_ar => "Appenzell Ausserrhoden", :ch_be => "Bern", :ch_bl => "Basel-Landschaft", :ch_bs => "Basel-Stadt", :ch_fr => "Fribourg", :ch_ge => "Genève", :ch_gl => "Glarus", :ch_gr => "Graubünden", :ch_ju => "Jura", :ch_lu => "Luzern", :ch_ne => "Neuchâtel", :ch_nw => "Nidwalden", :ch_ow => "Obwalden", :ch_sg => "Sankt Gallen", :ch_sh => "Schaffhausen", :ch_so => "Solothurn", :ch_sz => "Schwyz", :ch_tg => "Thurgau", :ch_ti => "Ticino", :ch_ur => "Uri", :ch_vd => "Vaud", :ch_vs => "Valais", :ch_zg => "Zug", :ch_zh => "Zürich", :cl => "Chile", :co => "Colombia", :cr => "Costa Rica", :cy => "Cyprus", :cz => "Czechia", :dk => "Denmark", :de => "Germany", :de_bb => "Brandenburg", :de_be => "Berlin", :de_bw => "Baden-Württemberg", :de_by => "Bayern", :de_by_augsburg => "Augsburg (Bayern)", :de_by_cath => "Bayern (Catholic regions)", :de_hb => "Bremen", :de_he => "Hessen", :de_hh => "Hamburg", :de_mv => "Mecklenburg-Vorpommern", :de_ni => "Niedersachsen", :de_nw => "Nordrhein-Westfalen", :de_rp => "Rheinland-Pfalz", :de_sh => "Schleswig-Holstein", :de_sl => "Saarland", :de_sn => "Sachsen", :de_sn_sorbian => "Sachsen (Sorbian regions)", :de_st => "Sachsen-Anhalt", :de_th => "Thüringen", :de_th_cath => "Thüringen (Catholic regions)", :ecbtarget => "ECB TARGET (European Central Bank)", :ee => "Estonia", :es => "Spain", :es_an => "Andalucía", :es_ar => "Aragón", :es_ce => "Ceuta", :es_cl => "Castilla y León", :es_cm => "Castilla-La Mancha", :es_cn => "Canary Islands", :es_ct => "Cataluña", :es_ex => "Extremadura", :es_ga => "Galicia", :es_ib => "Islas Baleares", :es_lo => "Rioja, La", :es_m => "Madrid", :es_mu => "Murcia", :es_na => "Navarra", :es_o => "Asturias", :es_pv => "País Vasco", :es_v => "Valencia/València", :es_vc => "Comunidad Valenciana", :federalreserve => "Federal Reserve", :federalreservebanks => "Federal Reserve Banks", :fedex => "FedEx", :fi => "Finland", :fr => "France", :fr_a => "Alsace", :fr_m => "Moselle", :gb => "United Kingdom", :gb_con => "Cornwall", :gb_eaw => "England and Wales", :gb_eng => "England", :gb_gsy => "Guernsey", :gb_iom => "Isle of Man", :gb_jsy => "Jersey", :gb_nir => "Northern Ireland", :gb_sct => "Scotland", :gb_wls => "Wales", :gg => "Guernsey", :im => "Isle of Man", :je => "Jersey", :ge => "Georgia", :gr => "Greece", :hr => "Croatia", :hk => "Hong Kong", :hu => "Hungary", :ie => "Ireland", :il => "Israel", :in => "India", :in_ap => "Andhra Pradesh", :in_ar => "Arunachal Pradesh", :in_as => "Assam", :in_br => "Bihar", :in_cg => "Chhattisgarh", :in_ga => "Goa", :in_gj => "Gujarat", :in_hp => "Himachal Pradesh", :in_hr => "Haryana", :in_jh => "Jharkhand", :in_jk => "Jammu and Kashmir", :in_ka => "Karnataka", :in_kl => "Kerala", :in_mh => "Maharashtra", :in_mp => "Madhya Pradesh", :in_mz => "Mizoram", :in_nl => "Nagaland", :in_od => "Odisha", :in_pb => "Punjab", :in_py => "Pondicherry", :in_sk => "Sikkim", :in_tr => "Tripura", :in_ts => "तेलंगाना", :in_wb => "West Bengal", :is => "Iceland", :it => "Italy", :it_bl => "Belluno", :it_fi => "Firenze", :it_ge => "Genova", :it_pd => "Padova", :it_rm => "Roma", :it_ro => "Rovigo", :it_to => "Torino", :it_tv => "Treviso", :it_ve => "Venezia", :it_vi => "Vicenza", :it_vr => "Verona", :ke => "Kenya", :kr => "South Korea", :kz => "Kazakhstan", :li => "Liechtenstein", :lt => "Lithuania", :lv => "Latvia", :ma => "Morocco", :mc => "Monaco", :mt_mt => "Malta", :mt_en => "Malta", :mx => "Mexico", :mx_pue => "Puebla", :nerc => "North American Electric Reliability Corporation", :nl => "Netherlands", :lu => "Luxembourg", :no => "Norway", :nyse => "New York Stock Exchange", :nz => "New Zealand", :nz_ak => "Auckland", :nz_ca => "Canterbury", :nz_ch => "Chatham Islands", :nz_hb => "Hawke's Bay", :nz_mb => "Marlborough", :nz_ne => "Nelson", :nz_nl => "Northland", :nz_ot => "Otago", :nz_sc => "South Canterbury", :nz_sl => "Southland", :nz_ta => "Taranaki", :nz_we => "Wellington", :nz_wl => "Westland", :pe => "Peru", :ph => "Philippines", :pl => "Poland", :pt => "Portugal", :pt_li => "Lisbon", :pt_po => "Porto", :ro => "Romania", :rs_cyrl => "Serbia", :rs_la => "Serbia", :ru => "Russian Federation", :se => "Sweden", :tn => "Tunisia", :tr => "Türkiye", :tsx => "Toronto Stock Exchange", :ua => "Ukraine", :us_ak => "Alaska", :us_al => "Alabama", :us_ar => "Arkansas", :us_az => "Arizona", :us_ca => "California", :us_co => "Colorado", :us_ct => "Connecticut", :us_dc => "District of Columbia", :us_de => "Delaware", :us_fl => "Florida", :us_ga => "Georgia", :us_gu => "Guam", :us_hi => "Hawaii", :us_ia => "Iowa", :us_id => "Idaho", :us_il => "Illinois", :us_in => "Indiana", :us_ks => "Kansas", :us_ky => "Kentucky", :us_la => "Louisiana", :us_ma => "Massachusetts", :us_md => "Maryland", :us_me => "Maine", :us_mi => "Michigan", :us_mn => "Minnesota", :us_mo => "Missouri", :us_ms => "Mississippi", :us_mt => "Montana", :us_nc => "North Carolina", :us_nd => "North Dakota", :us_ne => "Nebraska", :us_nh => "New Hampshire", :us_nj => "New Jersey", :us_nm => "New Mexico", :us_nv => "Nevada", :us_ny => "New York", :us_oh => "Ohio", :us_ok => "Oklahoma", :us_or => "Oregon", :us_pa => "Pennsylvania", :us_pr => "Puerto Rico", :us_ri => "Rhode Island", :us_sc => "South Carolina", :us_sd => "South Dakota", :us_tn => "Tennessee", :us_tx => "Texas", :us_ut => "Utah", :us_va => "Virginia", :us_vi => "Virgin Islands, U.S.", :us_vt => "Vermont", :us_wa => "Washington", :us_wi => "Wisconsin", :us_wv => "West Virginia", :us_wy => "Wyoming", :unitednations => "United Nations", :ups => "UPS", :za => "South Africa", :ve => "Venezuela", :sk => "Slovakia", :si => "Slovenia", :jp => "Japan", :vn => "Vietnam", :sg => "Singapore", :my => "Malaysia", :th => "Thailand", :ng => "Nigeria"}
|
|
8
8
|
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Holidays
|
|
3
|
+
# This file is generated by the Ruby Holidays gem.
|
|
4
|
+
#
|
|
5
|
+
# Definitions loaded: definitions/by.yaml
|
|
6
|
+
#
|
|
7
|
+
# All the definitions are available at https://github.com/holidays/holidays
|
|
8
|
+
module BY # :nodoc:
|
|
9
|
+
def self.defined_regions
|
|
10
|
+
[:by]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def self.holidays_by_month
|
|
14
|
+
{
|
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Вялікдзень каталіцкі", :regions => [:by]},
|
|
16
|
+
{:function => "orthodox_easter(year)", :function_arguments => [:year], :type => :informal, :name => "Вялікдзень праваслаўны", :regions => [:by]},
|
|
17
|
+
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 9, :name => "Радуніца", :regions => [:by]}],
|
|
18
|
+
1 => [{:mday => 1, :name => "Новы год", :regions => [:by]},
|
|
19
|
+
{:mday => 2, :name => "Новы год", :regions => [:by]},
|
|
20
|
+
{:mday => 7, :name => "Каляды праваслаўныя", :regions => [:by]}],
|
|
21
|
+
2 => [{:mday => 23, :type => :informal, :name => "Дзень абаронцаў Айчыны і Узброеных Сіл Рэспублікі Беларусь", :regions => [:by]}],
|
|
22
|
+
3 => [{:mday => 8, :name => "Міжнародны жаночы дзень", :regions => [:by]},
|
|
23
|
+
{:mday => 15, :type => :informal, :name => "Дзень Канстытуцыі", :regions => [:by]}],
|
|
24
|
+
4 => [{:mday => 2, :type => :informal, :name => "Дзень яднання народаў Беларусі і Расіі", :regions => [:by]}],
|
|
25
|
+
5 => [{:mday => 1, :name => "Свята працы", :regions => [:by]},
|
|
26
|
+
{:mday => 9, :name => "Дзень Перамогі", :regions => [:by]}],
|
|
27
|
+
7 => [{:mday => 3, :name => "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", :regions => [:by]}],
|
|
28
|
+
9 => [{:mday => 17, :type => :informal, :name => "Дзень народнага адзінства", :regions => [:by]}],
|
|
29
|
+
11 => [{:mday => 2, :type => :informal, :name => "Дзяды", :regions => [:by]},
|
|
30
|
+
{:mday => 7, :name => "Дзень Кастрычніцкай рэвалюцыі", :regions => [:by]}],
|
|
31
|
+
12 => [{:mday => 25, :name => "Каляды каталіцкія", :regions => [:by]}]
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.custom_methods
|
|
36
|
+
{
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -18,16 +18,17 @@ module Holidays
|
|
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 64, :name => "Corpus Christi", :regions => [:co]},
|
|
19
19
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 71, :name => "Sagrado Corazón", :regions => [:co]}],
|
|
20
20
|
1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:co]},
|
|
21
|
-
{:function => "
|
|
22
|
-
3 => [{:function => "
|
|
21
|
+
{:mday => 6, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Día de los Reyes Magos", :regions => [:co]}],
|
|
22
|
+
3 => [{:mday => 19, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Día de San José", :regions => [:co]}],
|
|
23
23
|
5 => [{:mday => 1, :name => "Día del Trabajo", :regions => [:co]}],
|
|
24
|
-
6 => [{:function => "
|
|
25
|
-
7 => [{:mday =>
|
|
24
|
+
6 => [{:mday => 29, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "San Pedro y San Pablo", :regions => [:co]}],
|
|
25
|
+
7 => [{:mday => 9, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :year_ranges => { :from => 2026 },:name => "Día de Nuestra Señora del Rosario de Chiquinquirá", :regions => [:co]},
|
|
26
|
+
{:mday => 20, :name => "Día de la Independencia", :regions => [:co]}],
|
|
26
27
|
8 => [{:mday => 7, :name => "Batalla de Boyacá", :regions => [:co]},
|
|
27
|
-
{:function => "
|
|
28
|
-
10 => [{:function => "
|
|
29
|
-
11 => [{:function => "
|
|
30
|
-
{:function => "
|
|
28
|
+
{:mday => 15, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "La Asunción de la Virgen", :regions => [:co]}],
|
|
29
|
+
10 => [{:mday => 12, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Día de la Raza", :regions => [:co]}],
|
|
30
|
+
11 => [{:mday => 1, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Día de Todos los Santos", :regions => [:co]},
|
|
31
|
+
{:mday => 11, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Independencia de Cartagena", :regions => [:co]}],
|
|
31
32
|
12 => [{:mday => 8, :name => "Día de la Inmaculada Concepción", :regions => [:co]},
|
|
32
33
|
{:mday => 25, :name => "Navidad", :regions => [:co]}]
|
|
33
34
|
}
|
|
@@ -44,76 +45,6 @@ end
|
|
|
44
45
|
date
|
|
45
46
|
},
|
|
46
47
|
|
|
47
|
-
"epiphany(year)" => Proc.new { |year|
|
|
48
|
-
date = Date.civil( year, 1, 6 )
|
|
49
|
-
if date.wday > 1
|
|
50
|
-
date += ( 8 - date.wday )
|
|
51
|
-
elsif date.wday == 0
|
|
52
|
-
date += 1
|
|
53
|
-
end
|
|
54
|
-
date
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
"saint_josephs_day(year)" => Proc.new { |year|
|
|
58
|
-
date = Date.civil( year, 3, 19 )
|
|
59
|
-
if date.wday > 1
|
|
60
|
-
date += ( 8 - date.wday )
|
|
61
|
-
elsif date.wday == 0
|
|
62
|
-
date += 1
|
|
63
|
-
end
|
|
64
|
-
date
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
"saint_peter_and_saint_paul(year)" => Proc.new { |year|
|
|
68
|
-
date = Date.civil( year, 6, 29 )
|
|
69
|
-
if date.wday > 1
|
|
70
|
-
date += ( 8 - date.wday )
|
|
71
|
-
elsif date.wday == 0
|
|
72
|
-
date += 1
|
|
73
|
-
end
|
|
74
|
-
date
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
"assumption_of_mary(year)" => Proc.new { |year|
|
|
78
|
-
date = Date.civil( year, 8, 15 )
|
|
79
|
-
if date.wday > 1
|
|
80
|
-
date += ( 8 - date.wday )
|
|
81
|
-
elsif date.wday == 0
|
|
82
|
-
date += 1
|
|
83
|
-
end
|
|
84
|
-
date
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
"columbus_day(year)" => Proc.new { |year|
|
|
88
|
-
date = Date.civil( year, 10, 12 )
|
|
89
|
-
if date.wday > 1
|
|
90
|
-
date += ( 8 - date.wday )
|
|
91
|
-
elsif date.wday == 0
|
|
92
|
-
date += 1
|
|
93
|
-
end
|
|
94
|
-
date
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
"all_saints_day(year)" => Proc.new { |year|
|
|
98
|
-
date = Date.civil( year, 11, 1 )
|
|
99
|
-
if date.wday > 1
|
|
100
|
-
date += ( 8 - date.wday )
|
|
101
|
-
elsif date.wday == 0
|
|
102
|
-
date += 1
|
|
103
|
-
end
|
|
104
|
-
date
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
"independence_of_cartagena(year)" => Proc.new { |year|
|
|
108
|
-
date = Date.civil( year, 11, 11 )
|
|
109
|
-
if date.wday > 1
|
|
110
|
-
date += ( 8 - date.wday )
|
|
111
|
-
elsif date.wday == 0
|
|
112
|
-
date += 1
|
|
113
|
-
end
|
|
114
|
-
date
|
|
115
|
-
},
|
|
116
|
-
|
|
117
48
|
|
|
118
49
|
}
|
|
119
50
|
end
|
|
@@ -30,7 +30,7 @@ module Holidays
|
|
|
30
30
|
6 => [{:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Región de Murcia", :regions => [:es_mu]},
|
|
31
31
|
{:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]},
|
|
32
32
|
{:mday => 24, :name => "San Juan", :regions => [:es_ct, :es_vc]}],
|
|
33
|
-
7 => [{:mday =>
|
|
33
|
+
7 => [{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Santiago Apostol", :regions => [:es_ga]}],
|
|
34
34
|
8 => [{:mday => 15, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Asunción", :regions => [:es]}],
|
|
35
35
|
9 => [{:mday => 2, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Ceuta", :regions => [:es_ce]},
|
|
36
36
|
{:mday => 8, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Asturias", :regions => [:es_o]},
|
|
@@ -354,6 +354,8 @@ module Holidays
|
|
|
354
354
|
{:mday => 1, :name => "Dia de Todos-os-Santos", :regions => [:pt]},
|
|
355
355
|
{:mday => 30, :name => "Sfântul Apostol Andrei", :regions => [:ro]},
|
|
356
356
|
{:mday => 1, :name => "Sviatok všetkých svätých", :regions => [:sk]},
|
|
357
|
+
{:mday => 17, :year_ranges => { :until => 2024 },:name => "Deň boja za slobodu a demokraciu", :regions => [:sk]},
|
|
358
|
+
{:mday => 17, :year_ranges => { :from => 2025 },:type => :informal, :name => "Deň boja za slobodu a demokraciu", :regions => [:sk]},
|
|
357
359
|
{:mday => 1, :name => "dan spomina na mrtve", :regions => [:si]},
|
|
358
360
|
{:mday => 1, :name => "Revival Leader's Day", :regions => [:bg_en]},
|
|
359
361
|
{:mday => 1, :name => "Ден на Народните будители", :regions => [:bg_bg]}],
|
|
@@ -448,7 +450,7 @@ module Holidays
|
|
|
448
450
|
{:mday => 21, :name => "Nationale Feestdag", :regions => [:be_nl]},
|
|
449
451
|
{:mday => 5, :name => "Den slovanských věrozvěstů Cyrila a Metoděje", :regions => [:cz]},
|
|
450
452
|
{:mday => 6, :name => "Den upálení mistra Jana Husa", :regions => [:cz]},
|
|
451
|
-
{:mday =>
|
|
453
|
+
{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Santiago Apostol", :regions => [:es_ga]},
|
|
452
454
|
{:mday => 14, :name => "Fête nationale", :regions => [:fr]},
|
|
453
455
|
{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
|
|
454
456
|
{:mday => 12, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Battle of the Boyne", :regions => [:gb_nir]},
|
|
@@ -534,12 +536,15 @@ module Holidays
|
|
|
534
536
|
{:mday => 8, :name => "Maria Geburt", :regions => [:li]},
|
|
535
537
|
{:mday => 24, :year_ranges => { :limited => [2018] },:name => "Viņa Svētības pāvesta Franciska pastorālās vizītes Latvijā diena", :regions => [:lv]},
|
|
536
538
|
{:mday => 30, :type => :informal, :name => "Dzień Chłopaka", :regions => [:pl]},
|
|
539
|
+
{:mday => 1, :year_ranges => { :until => 2023 },:name => "Deň Ústavy Slovenskej republiky", :regions => [:sk]},
|
|
540
|
+
{:mday => 1, :year_ranges => { :from => 2024 },:type => :informal, :name => "Deň Ústavy Slovenskej republiky", :regions => [:sk]},
|
|
537
541
|
{:mday => 15, :name => "Sedembolestná Panna Mária", :regions => [:sk]},
|
|
538
542
|
{:mday => 6, :name => "Unification Day", :regions => [:bg_en]},
|
|
539
543
|
{:mday => 6, :name => "Ден на Съединението", :regions => [:bg_bg]},
|
|
540
544
|
{:mday => 22, :name => "The Independence Day", :regions => [:bg_en]},
|
|
541
545
|
{:mday => 22, :name => "Ден на Независимостта", :regions => [:bg_bg]}],
|
|
542
546
|
2 => [{:mday => 28, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Andalucía", :regions => [:es_an]},
|
|
547
|
+
{:function => "ie_st_brigids_day(year)", :function_arguments => [:year], :year_ranges => { :from => 2023 },:name => "St Brigid's Day", :regions => [:ie]},
|
|
543
548
|
{:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]},
|
|
544
549
|
{:mday => 2, :name => "Maria Lichtmess", :regions => [:li]},
|
|
545
550
|
{:mday => 16, :name => "Valstybės atkūrimo diena", :regions => [:lt]},
|
|
@@ -606,6 +611,15 @@ end
|
|
|
606
611
|
date
|
|
607
612
|
},
|
|
608
613
|
|
|
614
|
+
"ie_st_brigids_day(year)" => Proc.new { |year|
|
|
615
|
+
date = Date.civil(year, 2, 1)
|
|
616
|
+
if date.wday == 5
|
|
617
|
+
date
|
|
618
|
+
else
|
|
619
|
+
date + ((1 - date.wday) % 7)
|
|
620
|
+
end
|
|
621
|
+
},
|
|
622
|
+
|
|
609
623
|
"is_sumardagurinn_fyrsti(year)" => Proc.new { |year|
|
|
610
624
|
date = Date.civil(year,4,18)
|
|
611
625
|
if date.wday < 4
|
|
@@ -14,6 +14,7 @@ module Holidays
|
|
|
14
14
|
{
|
|
15
15
|
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:ie]}],
|
|
16
16
|
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:ie]}],
|
|
17
|
+
2 => [{:function => "ie_st_brigids_day(year)", :function_arguments => [:year], :year_ranges => { :from => 2023 },:name => "St Brigid's Day", :regions => [:ie]}],
|
|
17
18
|
3 => [{:mday => 17, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "St. Patrick's Day", :regions => [:ie]}],
|
|
18
19
|
5 => [{:wday => 1, :week => 1, :name => "May Day", :regions => [:ie]}],
|
|
19
20
|
6 => [{:wday => 1, :week => 1, :name => "June Bank Holiday", :regions => [:ie]}],
|
|
@@ -26,7 +27,16 @@ module Holidays
|
|
|
26
27
|
|
|
27
28
|
def self.custom_methods
|
|
28
29
|
{
|
|
29
|
-
|
|
30
|
+
"ie_st_brigids_day(year)" => Proc.new { |year|
|
|
31
|
+
date = Date.civil(year, 2, 1)
|
|
32
|
+
if date.wday == 5
|
|
33
|
+
date
|
|
34
|
+
else
|
|
35
|
+
date + ((1 - date.wday) % 7)
|
|
36
|
+
end
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
|
|
30
40
|
}
|
|
31
41
|
end
|
|
32
42
|
end
|
|
@@ -75,7 +75,7 @@ module Holidays
|
|
|
75
75
|
{:wday => 1, :week => 1, :name => "Jefferson Davis' Birthday", :regions => [:us_al]},
|
|
76
76
|
{:mday => 3, :name => "Birthday of Jefferson Davis", :regions => [:us_fl]},
|
|
77
77
|
{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "King Kamehameha I Day", :regions => [:us_hi]},
|
|
78
|
-
{:mday => 19, :year_ranges => { :from => 2021 },:observed => "
|
|
78
|
+
{:mday => 19, :year_ranges => { :from => 2021 },:observed => "juneteenth_national_independence_day(region, date)", :observed_arguments => [:region, :date], :name => "Juneteenth National Independence Day", :regions => [:us]},
|
|
79
79
|
{:mday => 19, :name => "Emancipation Day in Texas", :regions => [:us_tx]},
|
|
80
80
|
{:mday => 20, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "West Virginia Day", :regions => [:us_wv]},
|
|
81
81
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
|
@@ -213,6 +213,27 @@ king_day = Date.civil(year, month, day_of_holiday)
|
|
|
213
213
|
king_day.downto(beginning_of_month).find {|date| date if date.wday == 5 }
|
|
214
214
|
},
|
|
215
215
|
|
|
216
|
+
"juneteenth_national_independence_day(region, date)" => Proc.new { |region, date|
|
|
217
|
+
if region == :us_ut
|
|
218
|
+
case date.wday
|
|
219
|
+
when 1
|
|
220
|
+
date
|
|
221
|
+
when 2,3,4,5
|
|
222
|
+
date - (date.wday - 1)
|
|
223
|
+
when 6
|
|
224
|
+
date + 2
|
|
225
|
+
when 0
|
|
226
|
+
date + 1
|
|
227
|
+
end
|
|
228
|
+
elsif date.wday == 0
|
|
229
|
+
date + 1
|
|
230
|
+
elsif date.wday == 6
|
|
231
|
+
date - 1
|
|
232
|
+
else
|
|
233
|
+
date
|
|
234
|
+
end
|
|
235
|
+
},
|
|
236
|
+
|
|
216
237
|
"election_day(year)" => Proc.new { |year|
|
|
217
238
|
Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 11, 1, 1) + 1
|
|
218
239
|
},
|
|
@@ -14,22 +14,26 @@ module Holidays
|
|
|
14
14
|
{
|
|
15
15
|
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:pe]},
|
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:pe]},
|
|
17
|
-
{:function => "easter(year)", :function_arguments => [:year], :name => "Pascua", :regions => [:pe]}],
|
|
17
|
+
{:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pascua", :regions => [:pe]}],
|
|
18
18
|
1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:pe]},
|
|
19
|
-
{:mday => 6, :
|
|
19
|
+
{:mday => 6, :type => :informal, :name => "Día de los Reyes Magos", :regions => [:pe]}],
|
|
20
20
|
5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:pe]},
|
|
21
21
|
{:wday => 0, :week => 2, :type => :informal, :name => "Día de la Madre", :regions => [:pe]}],
|
|
22
|
-
6 => [{:mday => 7, :type => :informal, :name => "Día de la Bandera", :regions => [:pe]},
|
|
22
|
+
6 => [{:mday => 7, :year_ranges => { :until => 2023 },:type => :informal, :name => "Día de la Bandera", :regions => [:pe]},
|
|
23
|
+
{:mday => 7, :year_ranges => { :from => 2024 },:name => "Batalla de Arica y Día de la Bandera", :regions => [:pe]},
|
|
23
24
|
{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:pe]},
|
|
24
25
|
{:mday => 24, :type => :informal, :name => "Inti Raymi", :regions => [:pe]},
|
|
25
|
-
{:mday => 29, :name => "San
|
|
26
|
-
7 => [{:mday =>
|
|
26
|
+
{:mday => 29, :name => "Día de San Pedro y San Pablo", :regions => [:pe]}],
|
|
27
|
+
7 => [{:mday => 23, :year_ranges => { :from => 2023 },:name => "Día de la Fuerza Aérea del Perú", :regions => [:pe]},
|
|
28
|
+
{:mday => 28, :name => "Primer Día de la Independencia", :regions => [:pe]},
|
|
27
29
|
{:mday => 29, :name => "Segundo Día de la Independencia", :regions => [:pe]}],
|
|
28
|
-
8 => [{:mday =>
|
|
30
|
+
8 => [{:mday => 6, :year_ranges => { :from => 2022 },:name => "Batalla de Junín", :regions => [:pe]},
|
|
31
|
+
{:mday => 30, :name => "Santa Rosa de Lima", :regions => [:pe]}],
|
|
29
32
|
9 => [{:mday => 24, :type => :informal, :name => "Día de las Fuerzas Armadas", :regions => [:pe]}],
|
|
30
|
-
10 => [{:mday => 8, :name => "
|
|
33
|
+
10 => [{:mday => 8, :name => "Combate de Angamos", :regions => [:pe]}],
|
|
31
34
|
11 => [{:mday => 1, :name => "Todos los Santos", :regions => [:pe]}],
|
|
32
35
|
12 => [{:mday => 8, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Inmaculada Concepción", :regions => [:pe]},
|
|
36
|
+
{:mday => 9, :year_ranges => { :from => 2022 },:name => "Batalla de Ayacucho", :regions => [:pe]},
|
|
33
37
|
{:mday => 25, :name => "Navidad del Señor", :regions => [:pe]}]
|
|
34
38
|
}
|
|
35
39
|
end
|
|
@@ -20,8 +20,12 @@ module Holidays
|
|
|
20
20
|
{:mday => 8, :name => "Deň víťazstva nad fašizmom", :regions => [:sk]}],
|
|
21
21
|
7 => [{:mday => 5, :name => "Sviatok svätého Cyrila a svätého Metoda", :regions => [:sk]}],
|
|
22
22
|
8 => [{:mday => 29, :name => "Výročie Slovenského národného povstania", :regions => [:sk]}],
|
|
23
|
-
9 => [{:mday =>
|
|
24
|
-
|
|
23
|
+
9 => [{:mday => 1, :year_ranges => { :until => 2023 },:name => "Deň Ústavy Slovenskej republiky", :regions => [:sk]},
|
|
24
|
+
{:mday => 1, :year_ranges => { :from => 2024 },:type => :informal, :name => "Deň Ústavy Slovenskej republiky", :regions => [:sk]},
|
|
25
|
+
{:mday => 15, :name => "Sedembolestná Panna Mária", :regions => [:sk]}],
|
|
26
|
+
11 => [{:mday => 1, :name => "Sviatok všetkých svätých", :regions => [:sk]},
|
|
27
|
+
{:mday => 17, :year_ranges => { :until => 2024 },:name => "Deň boja za slobodu a demokraciu", :regions => [:sk]},
|
|
28
|
+
{:mday => 17, :year_ranges => { :from => 2025 },:type => :informal, :name => "Deň boja za slobodu a demokraciu", :regions => [:sk]}],
|
|
25
29
|
12 => [{:mday => 24, :name => "Štedrý deň", :regions => [:sk]},
|
|
26
30
|
{:mday => 25, :name => "1. sviatok vianočný", :regions => [:sk]},
|
|
27
31
|
{:mday => 26, :name => "2. sviatok vianočný", :regions => [:sk]}]
|
|
@@ -30,7 +30,7 @@ module Holidays
|
|
|
30
30
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 71, :name => "Sagrado Corazón", :regions => [:co]},
|
|
31
31
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:pe]},
|
|
32
32
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:pe]},
|
|
33
|
-
{:function => "easter(year)", :function_arguments => [:year], :name => "Pascua", :regions => [:pe]},
|
|
33
|
+
{:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pascua", :regions => [:pe]},
|
|
34
34
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :name => "Lunes Carnaval", :regions => [:ve]},
|
|
35
35
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Martes Carnaval", :regions => [:ve]},
|
|
36
36
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:ve]},
|
|
@@ -39,12 +39,12 @@ module Holidays
|
|
|
39
39
|
{:mday => 1, :name => "Dia da Confraternização Universal", :regions => [:br]},
|
|
40
40
|
{:mday => 1, :name => "Año Nuevo", :regions => [:cl]},
|
|
41
41
|
{:mday => 1, :name => "Año Nuevo", :regions => [:co]},
|
|
42
|
-
{:function => "
|
|
42
|
+
{:mday => 6, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Día de los Reyes Magos", :regions => [:co]},
|
|
43
43
|
{:mday => 1, :name => "Año Nuevo", :regions => [:pe]},
|
|
44
|
-
{:mday => 6, :
|
|
44
|
+
{:mday => 6, :type => :informal, :name => "Día de los Reyes Magos", :regions => [:pe]},
|
|
45
45
|
{:mday => 1, :name => "Año Nuevo", :regions => [:ve]}],
|
|
46
46
|
3 => [{:mday => 24, :name => "Día Nacional de la Memoria por la Verdad y la Justicia", :regions => [:ar]},
|
|
47
|
-
{:function => "
|
|
47
|
+
{:mday => 19, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Día de San José", :regions => [:co]}],
|
|
48
48
|
4 => [{:mday => 2, :name => "Día del Veterano y de los Caídos en la Guerra de Malvinas", :regions => [:ar]},
|
|
49
49
|
{:mday => 21, :name => "Dia de Tiradentes", :regions => [:br]},
|
|
50
50
|
{:mday => 19, :name => "Declaración Independencia", :regions => [:ve]}],
|
|
@@ -61,16 +61,19 @@ module Holidays
|
|
|
61
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
62
|
{:mday => 20, :name => "Día de la Bandera", :regions => [:ar]},
|
|
63
63
|
{:mday => 29, :year_ranges => { :until => 1999 },:name => "San Pedro y San Pablo", :regions => [:cl]},
|
|
64
|
-
{:function => "
|
|
65
|
-
{:mday => 7, :type => :informal, :name => "Día de la Bandera", :regions => [:pe]},
|
|
64
|
+
{:mday => 29, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "San Pedro y San Pablo", :regions => [:co]},
|
|
65
|
+
{:mday => 7, :year_ranges => { :until => 2023 },:type => :informal, :name => "Día de la Bandera", :regions => [:pe]},
|
|
66
|
+
{:mday => 7, :year_ranges => { :from => 2024 },:name => "Batalla de Arica y Día de la Bandera", :regions => [:pe]},
|
|
66
67
|
{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:pe]},
|
|
67
68
|
{:mday => 24, :type => :informal, :name => "Inti Raymi", :regions => [:pe]},
|
|
68
|
-
{:mday => 29, :name => "San
|
|
69
|
+
{:mday => 29, :name => "Día de San Pedro y San Pablo", :regions => [:pe]},
|
|
69
70
|
{:mday => 24, :name => "Aniversario Batalla de Carabobo", :regions => [:ve]}],
|
|
70
71
|
7 => [{:mday => 8, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
|
|
71
72
|
{:mday => 9, :name => "Día de la Independencia", :regions => [:ar]},
|
|
72
73
|
{:mday => 16, :name => "Día de la Virgen del Carmen", :regions => [:cl]},
|
|
74
|
+
{:mday => 9, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :year_ranges => { :from => 2026 },:name => "Día de Nuestra Señora del Rosario de Chiquinquirá", :regions => [:co]},
|
|
73
75
|
{:mday => 20, :name => "Día de la Independencia", :regions => [:co]},
|
|
76
|
+
{:mday => 23, :year_ranges => { :from => 2023 },:name => "Día de la Fuerza Aérea del Perú", :regions => [:pe]},
|
|
74
77
|
{:mday => 28, :name => "Primer Día de la Independencia", :regions => [:pe]},
|
|
75
78
|
{:mday => 29, :name => "Segundo Día de la Independencia", :regions => [:pe]},
|
|
76
79
|
{:mday => 5, :name => "Día de la Independencia", :regions => [:ve]},
|
|
@@ -78,15 +81,16 @@ module Holidays
|
|
|
78
81
|
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]},
|
|
79
82
|
{:mday => 15, :name => "Asunción de la Virgen", :regions => [:cl]},
|
|
80
83
|
{:mday => 7, :name => "Batalla de Boyacá", :regions => [:co]},
|
|
81
|
-
{:function => "
|
|
84
|
+
{:mday => 15, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "La Asunción de la Virgen", :regions => [:co]},
|
|
85
|
+
{:mday => 6, :year_ranges => { :from => 2022 },:name => "Batalla de Junín", :regions => [:pe]},
|
|
82
86
|
{:mday => 30, :name => "Santa Rosa de Lima", :regions => [:pe]}],
|
|
83
87
|
10 => [{:mday => 12, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
|
|
84
88
|
{:mday => 8, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]},
|
|
85
89
|
{:mday => 12, :name => "Dia de Nossa Senhora Aparecida", :regions => [:br]},
|
|
86
90
|
{:mday => 12, :year_ranges => { :until => 1999 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
|
|
87
91
|
{:function => "columbus_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
|
|
88
|
-
{:function => "
|
|
89
|
-
{:mday => 8, :name => "
|
|
92
|
+
{:mday => 12, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Día de la Raza", :regions => [:co]},
|
|
93
|
+
{:mday => 8, :name => "Combate de Angamos", :regions => [:pe]},
|
|
90
94
|
{:mday => 12, :name => "Día de la Resistencia Indígena", :regions => [:ve]}],
|
|
91
95
|
11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]},
|
|
92
96
|
{:mday => 22, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]},
|
|
@@ -94,8 +98,8 @@ module Holidays
|
|
|
94
98
|
{:mday => 15, :name => "Proclamação da República", :regions => [:br]},
|
|
95
99
|
{:mday => 20, :year_ranges => { :from => 2024 },:name => "Dia Nacional de Zumbi e da Consciência Negra", :regions => [:br]},
|
|
96
100
|
{:mday => 1, :name => "Día de Todos los Santos", :regions => [:cl]},
|
|
97
|
-
{:function => "
|
|
98
|
-
{:function => "
|
|
101
|
+
{:mday => 1, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Día de Todos los Santos", :regions => [:co]},
|
|
102
|
+
{:mday => 11, :function => "to_following_monday_if_not_monday(date)", :function_arguments => [:date], :name => "Independencia de Cartagena", :regions => [:co]},
|
|
99
103
|
{:mday => 1, :name => "Todos los Santos", :regions => [:pe]}],
|
|
100
104
|
12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:ar]},
|
|
101
105
|
{:mday => 9, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
|
|
@@ -106,6 +110,7 @@ module Holidays
|
|
|
106
110
|
{:mday => 8, :name => "Día de la Inmaculada Concepción", :regions => [:co]},
|
|
107
111
|
{:mday => 25, :name => "Navidad", :regions => [:co]},
|
|
108
112
|
{:mday => 8, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Inmaculada Concepción", :regions => [:pe]},
|
|
113
|
+
{:mday => 9, :year_ranges => { :from => 2022 },:name => "Batalla de Ayacucho", :regions => [:pe]},
|
|
109
114
|
{:mday => 25, :name => "Navidad del Señor", :regions => [:pe]},
|
|
110
115
|
{:mday => 25, :name => "Día de Navidad", :regions => [:ve]}],
|
|
111
116
|
9 => [{:mday => 7, :name => "Proclamação da Independência", :regions => [:br]},
|
|
@@ -171,76 +176,6 @@ end
|
|
|
171
176
|
date
|
|
172
177
|
},
|
|
173
178
|
|
|
174
|
-
"epiphany(year)" => Proc.new { |year|
|
|
175
|
-
date = Date.civil( year, 1, 6 )
|
|
176
|
-
if date.wday > 1
|
|
177
|
-
date += ( 8 - date.wday )
|
|
178
|
-
elsif date.wday == 0
|
|
179
|
-
date += 1
|
|
180
|
-
end
|
|
181
|
-
date
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
"saint_josephs_day(year)" => Proc.new { |year|
|
|
185
|
-
date = Date.civil( year, 3, 19 )
|
|
186
|
-
if date.wday > 1
|
|
187
|
-
date += ( 8 - date.wday )
|
|
188
|
-
elsif date.wday == 0
|
|
189
|
-
date += 1
|
|
190
|
-
end
|
|
191
|
-
date
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
"saint_peter_and_saint_paul(year)" => Proc.new { |year|
|
|
195
|
-
date = Date.civil( year, 6, 29 )
|
|
196
|
-
if date.wday > 1
|
|
197
|
-
date += ( 8 - date.wday )
|
|
198
|
-
elsif date.wday == 0
|
|
199
|
-
date += 1
|
|
200
|
-
end
|
|
201
|
-
date
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
"assumption_of_mary(year)" => Proc.new { |year|
|
|
205
|
-
date = Date.civil( year, 8, 15 )
|
|
206
|
-
if date.wday > 1
|
|
207
|
-
date += ( 8 - date.wday )
|
|
208
|
-
elsif date.wday == 0
|
|
209
|
-
date += 1
|
|
210
|
-
end
|
|
211
|
-
date
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
"columbus_day(year)" => Proc.new { |year|
|
|
215
|
-
date = Date.civil( year, 10, 12 )
|
|
216
|
-
if date.wday > 1
|
|
217
|
-
date += ( 8 - date.wday )
|
|
218
|
-
elsif date.wday == 0
|
|
219
|
-
date += 1
|
|
220
|
-
end
|
|
221
|
-
date
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
"all_saints_day(year)" => Proc.new { |year|
|
|
225
|
-
date = Date.civil( year, 11, 1 )
|
|
226
|
-
if date.wday > 1
|
|
227
|
-
date += ( 8 - date.wday )
|
|
228
|
-
elsif date.wday == 0
|
|
229
|
-
date += 1
|
|
230
|
-
end
|
|
231
|
-
date
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
"independence_of_cartagena(year)" => Proc.new { |year|
|
|
235
|
-
date = Date.civil( year, 11, 11 )
|
|
236
|
-
if date.wday > 1
|
|
237
|
-
date += ( 8 - date.wday )
|
|
238
|
-
elsif date.wday == 0
|
|
239
|
-
date += 1
|
|
240
|
-
end
|
|
241
|
-
date
|
|
242
|
-
},
|
|
243
|
-
|
|
244
179
|
|
|
245
180
|
}
|
|
246
181
|
end
|
|
@@ -53,7 +53,7 @@ module Holidays
|
|
|
53
53
|
6 => [{:wday => 1, :week => 1, :name => "Jefferson Davis' Birthday", :regions => [:us_al]},
|
|
54
54
|
{:mday => 3, :name => "Birthday of Jefferson Davis", :regions => [:us_fl]},
|
|
55
55
|
{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "King Kamehameha I Day", :regions => [:us_hi]},
|
|
56
|
-
{:mday => 19, :year_ranges => { :from => 2021 },:observed => "
|
|
56
|
+
{:mday => 19, :year_ranges => { :from => 2021 },:observed => "juneteenth_national_independence_day(region, date)", :observed_arguments => [:region, :date], :name => "Juneteenth National Independence Day", :regions => [:us]},
|
|
57
57
|
{:mday => 19, :name => "Emancipation Day in Texas", :regions => [:us_tx]},
|
|
58
58
|
{:mday => 20, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "West Virginia Day", :regions => [:us_wv]},
|
|
59
59
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
|
@@ -137,6 +137,27 @@ king_day = Date.civil(year, month, day_of_holiday)
|
|
|
137
137
|
king_day.downto(beginning_of_month).find {|date| date if date.wday == 5 }
|
|
138
138
|
},
|
|
139
139
|
|
|
140
|
+
"juneteenth_national_independence_day(region, date)" => Proc.new { |region, date|
|
|
141
|
+
if region == :us_ut
|
|
142
|
+
case date.wday
|
|
143
|
+
when 1
|
|
144
|
+
date
|
|
145
|
+
when 2,3,4,5
|
|
146
|
+
date - (date.wday - 1)
|
|
147
|
+
when 6
|
|
148
|
+
date + 2
|
|
149
|
+
when 0
|
|
150
|
+
date + 1
|
|
151
|
+
end
|
|
152
|
+
elsif date.wday == 0
|
|
153
|
+
date + 1
|
|
154
|
+
elsif date.wday == 6
|
|
155
|
+
date - 1
|
|
156
|
+
else
|
|
157
|
+
date
|
|
158
|
+
end
|
|
159
|
+
},
|
|
160
|
+
|
|
140
161
|
"election_day(year)" => Proc.new { |year|
|
|
141
162
|
Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 11, 1, 1) + 1
|
|
142
163
|
},
|
|
@@ -35,30 +35,19 @@ module Holidays
|
|
|
35
35
|
raise ArgumentError if desired_func_args.include?(:region) && !input[:region].is_a?(Symbol)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
# Arguments are supplied in the order the definition declares them. The proc
|
|
39
|
+
# is built with that same declared order, so anything else silently binds
|
|
40
|
+
# values to the wrong parameters.
|
|
38
41
|
def parse_arguments(input, target_args)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
if target_args.include?(:day)
|
|
50
|
-
args << input[:day]
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
if target_args.include?(:date)
|
|
54
|
-
args << Date.civil(input[:year], input[:month], input[:day])
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
if target_args.include?(:region)
|
|
58
|
-
args << input[:region]
|
|
42
|
+
target_args.map do |arg|
|
|
43
|
+
case arg
|
|
44
|
+
when :year then input[:year]
|
|
45
|
+
when :month then input[:month]
|
|
46
|
+
when :day then input[:day]
|
|
47
|
+
when :date then Date.civil(input[:year], input[:month], input[:day])
|
|
48
|
+
when :region then input[:region]
|
|
49
|
+
end
|
|
59
50
|
end
|
|
60
|
-
|
|
61
|
-
args
|
|
62
51
|
end
|
|
63
52
|
|
|
64
53
|
def calculate(input, id, args, modifier)
|
|
@@ -120,11 +120,14 @@ module Holidays
|
|
|
120
120
|
}
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
+
# Observed methods default to taking only a date, but they may declare
|
|
124
|
+
# additional arguments such as :region so that a single definition shared
|
|
125
|
+
# across regions can observe differently in one of them.
|
|
123
126
|
def build_observed_date(date, regions, h)
|
|
124
127
|
@custom_method_processor.call(
|
|
125
128
|
build_custom_method_input(date.year, date.month, date.day, regions),
|
|
126
129
|
h[:observed],
|
|
127
|
-
[:date],
|
|
130
|
+
h[:observed_arguments] || [:date],
|
|
128
131
|
)
|
|
129
132
|
end
|
|
130
133
|
end
|
data/lib/holidays/version.rb
CHANGED
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: 11.
|
|
4
|
+
version: 11.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Dunae
|
|
@@ -114,6 +114,7 @@ files:
|
|
|
114
114
|
- lib/generated_definitions/be_nl.rb
|
|
115
115
|
- lib/generated_definitions/bg.rb
|
|
116
116
|
- lib/generated_definitions/br.rb
|
|
117
|
+
- lib/generated_definitions/by.rb
|
|
117
118
|
- lib/generated_definitions/ca.rb
|
|
118
119
|
- lib/generated_definitions/ch.rb
|
|
119
120
|
- lib/generated_definitions/cl.rb
|