holidays 10.0.0 → 11.0.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 +5 -0
- data/lib/generated_definitions/MANIFEST +1 -3
- data/lib/generated_definitions/REGIONS.rb +2 -2
- data/lib/generated_definitions/{vi.rb → vn.rb} +8 -8
- data/lib/holidays/date_calculator/lunar_date.rb +1 -1
- data/lib/holidays/date_calculator/weekend_modifier.rb +8 -0
- data/lib/holidays/definition/context/generator.rb +2 -2
- data/lib/holidays/definition/validator/region.rb +1 -1
- data/lib/holidays/finder/context/parse_options.rb +1 -1
- data/lib/holidays/finder/context/year_holiday.rb +1 -1
- data/lib/holidays/finder/rules/in_region.rb +1 -1
- data/lib/holidays/version.rb +1 -1
- metadata +2 -4
- data/lib/generated_definitions/be.rb +0 -42
- data/lib/generated_definitions/el.rb +0 -38
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4a50db0819861773f47fbb4a0d9a4ae915252de055df2469ce1c0bde7d37a841
|
|
4
|
+
data.tar.gz: 7ab200f4615da49c92460f1bc7f6ccda43e4d955fac918425b1d9e78199592e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b769b76632a24b952c132ccaee4e76dfb7b6f03c84004b19cd4243e6c2fc79c1756d131e6e7d275c36f62943f79a19833cc44e7051b02de3c184312823236cd7
|
|
7
|
+
data.tar.gz: b374d432b537393e8afbe38dfc3fee5c20f70aa35e32c4c46bb2b8b13f9f5c4422662f3d083cf0f2e6a5db6cd457e2d941898a9596387203e6f4eb88a8765cb8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Ruby Holidays Gem CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 11.0.0
|
|
4
|
+
|
|
5
|
+
* Update to [v8.0.0 definitions](https://github.com/holidays/definitions/releases/tag/v8.0.0). Please see the changelog for the definition details.
|
|
6
|
+
* Rename the Vietnam region code from `vi` to `vn` to follow ISO 3166-1 alpha-2 (`VI` is the US Virgin Islands, `VN` is Vietnam) ([definitions #177](https://github.com/holidays/definitions/issues/177)). This is a breaking change: callers must use `:vn` instead of `:vi`.
|
|
7
|
+
|
|
3
8
|
## 10.0.0
|
|
4
9
|
|
|
5
10
|
* Drop support for Ruby 3.2. Supported versions are now 3.3, 3.4, 4.0, and ruby-head.
|
|
@@ -5,7 +5,6 @@ The following definition files are included in this installation:
|
|
|
5
5
|
* generated_definitions/ar
|
|
6
6
|
* generated_definitions/at
|
|
7
7
|
* generated_definitions/au
|
|
8
|
-
* generated_definitions/be
|
|
9
8
|
* generated_definitions/be_fr
|
|
10
9
|
* generated_definitions/be_nl
|
|
11
10
|
* generated_definitions/bg
|
|
@@ -21,7 +20,6 @@ The following definition files are included in this installation:
|
|
|
21
20
|
* generated_definitions/dk
|
|
22
21
|
* generated_definitions/ecbtarget
|
|
23
22
|
* generated_definitions/ee
|
|
24
|
-
* generated_definitions/el
|
|
25
23
|
* generated_definitions/es
|
|
26
24
|
* generated_definitions/europe
|
|
27
25
|
* generated_definitions/federalreserve
|
|
@@ -84,5 +82,5 @@ The following definition files are included in this installation:
|
|
|
84
82
|
* generated_definitions/ups
|
|
85
83
|
* generated_definitions/us
|
|
86
84
|
* generated_definitions/ve
|
|
87
|
-
* generated_definitions/
|
|
85
|
+
* generated_definitions/vn
|
|
88
86
|
* generated_definitions/za
|
|
@@ -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, :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, :
|
|
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]
|
|
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,
|
|
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}
|
|
6
6
|
end
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
module Holidays
|
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
|
4
4
|
#
|
|
5
|
-
# Definitions loaded: definitions/
|
|
5
|
+
# Definitions loaded: definitions/vn.yaml
|
|
6
6
|
#
|
|
7
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
|
8
|
-
module
|
|
8
|
+
module VN # :nodoc:
|
|
9
9
|
def self.defined_regions
|
|
10
|
-
[:
|
|
10
|
+
[:vn]
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def self.holidays_by_month
|
|
14
14
|
{
|
|
15
|
-
1 => [{:mday => 1, :name => "Tết dương lịch", :regions => [:
|
|
16
|
-
3 => [{:mday => 10, :function => "lunar_to_solar(year, month, day, region)", :function_arguments => [:year, :month, :day, :region], :name => "Giỗ tổ Hùng Vương", :regions => [:
|
|
17
|
-
4 => [{:mday => 30, :name => "Ngày Giải phóng miền Nam, thống nhất đất nước", :regions => [:
|
|
18
|
-
5 => [{:mday => 1, :name => "Ngày Quốc tế Lao động", :regions => [:
|
|
19
|
-
9 => [{:mday => 2, :name => "Quốc khánh", :regions => [:
|
|
15
|
+
1 => [{:mday => 1, :name => "Tết dương lịch", :regions => [:vn]}],
|
|
16
|
+
3 => [{:mday => 10, :function => "lunar_to_solar(year, month, day, region)", :function_arguments => [:year, :month, :day, :region], :name => "Giỗ tổ Hùng Vương", :regions => [:vn]}],
|
|
17
|
+
4 => [{:mday => 30, :name => "Ngày Giải phóng miền Nam, thống nhất đất nước", :regions => [:vn]}],
|
|
18
|
+
5 => [{:mday => 1, :name => "Ngày Quốc tế Lao động", :regions => [:vn]}],
|
|
19
|
+
9 => [{:mday => 2, :name => "Quốc khánh", :regions => [:vn]}]
|
|
20
20
|
}
|
|
21
21
|
end
|
|
22
22
|
|
|
@@ -84,6 +84,14 @@ module Holidays
|
|
|
84
84
|
date
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
+
def to_the_weekday_after(date)
|
|
88
|
+
to_monday_if_sunday(to_monday_if_sunday(date) + 1)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def to_the_second_weekday_after(date)
|
|
92
|
+
to_monday_if_sunday(to_the_weekday_after(date) + 1)
|
|
93
|
+
end
|
|
94
|
+
|
|
87
95
|
def to_previous_day_if_leap_year(date)
|
|
88
96
|
date -= 1 if ::Date.gregorian_leap?(date.year)
|
|
89
97
|
date
|
|
@@ -105,7 +105,7 @@ module Holidays
|
|
|
105
105
|
rule[:year_ranges][:between] = Range.new(start_year, end_year)
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
-
rule[:regions] = rule[:regions].collect
|
|
108
|
+
rule[:regions] = rule[:regions].collect(&:to_sym)
|
|
109
109
|
regions << rule[:regions]
|
|
110
110
|
|
|
111
111
|
exists = false
|
|
@@ -200,7 +200,7 @@ module Holidays
|
|
|
200
200
|
if method = @custom_methods_repository.find(function_id)
|
|
201
201
|
method.parameters.collect { |arg| arg[1] }
|
|
202
202
|
elsif method = parsed_custom_methods[function_id]
|
|
203
|
-
method.arguments.collect
|
|
203
|
+
method.arguments.collect(&:to_sym)
|
|
204
204
|
else
|
|
205
205
|
raise ArgumentError, "Unknown function '#{function_id}'. It must either be a built-in method or be defined in the 'methods' section of a definition file."
|
|
206
206
|
end
|
|
@@ -9,7 +9,7 @@ module Holidays
|
|
|
9
9
|
# When an underscore is encountered, derive the parent regions
|
|
10
10
|
# symbol and check for both.
|
|
11
11
|
requested = requested.collect do |r|
|
|
12
|
-
if r.to_s
|
|
12
|
+
if r.to_s.include?('_')
|
|
13
13
|
chunks = r.to_s.split('_')
|
|
14
14
|
|
|
15
15
|
chunks.length.downto(1).map do |num|
|
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:
|
|
4
|
+
version: 11.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Dunae
|
|
@@ -110,7 +110,6 @@ files:
|
|
|
110
110
|
- lib/generated_definitions/ar.rb
|
|
111
111
|
- lib/generated_definitions/at.rb
|
|
112
112
|
- lib/generated_definitions/au.rb
|
|
113
|
-
- lib/generated_definitions/be.rb
|
|
114
113
|
- lib/generated_definitions/be_fr.rb
|
|
115
114
|
- lib/generated_definitions/be_nl.rb
|
|
116
115
|
- lib/generated_definitions/bg.rb
|
|
@@ -126,7 +125,6 @@ files:
|
|
|
126
125
|
- lib/generated_definitions/dk.rb
|
|
127
126
|
- lib/generated_definitions/ecbtarget.rb
|
|
128
127
|
- lib/generated_definitions/ee.rb
|
|
129
|
-
- lib/generated_definitions/el.rb
|
|
130
128
|
- lib/generated_definitions/es.rb
|
|
131
129
|
- lib/generated_definitions/europe.rb
|
|
132
130
|
- lib/generated_definitions/federalreserve.rb
|
|
@@ -189,7 +187,7 @@ files:
|
|
|
189
187
|
- lib/generated_definitions/ups.rb
|
|
190
188
|
- lib/generated_definitions/us.rb
|
|
191
189
|
- lib/generated_definitions/ve.rb
|
|
192
|
-
- lib/generated_definitions/
|
|
190
|
+
- lib/generated_definitions/vn.rb
|
|
193
191
|
- lib/generated_definitions/za.rb
|
|
194
192
|
- lib/holidays.rb
|
|
195
193
|
- lib/holidays/core_extensions/date.rb
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
module Holidays
|
|
3
|
-
# This file is generated by the Ruby Holidays gem.
|
|
4
|
-
#
|
|
5
|
-
# Definitions loaded: definitions/be.yaml
|
|
6
|
-
#
|
|
7
|
-
# To use the definitions in this file, load it right after you load the
|
|
8
|
-
# Holiday gem:
|
|
9
|
-
#
|
|
10
|
-
# require 'holidays'
|
|
11
|
-
# require 'generated_definitions/be'
|
|
12
|
-
#
|
|
13
|
-
# All the definitions are available at https://github.com/holidays/holidays
|
|
14
|
-
module BE # :nodoc:
|
|
15
|
-
def self.defined_regions
|
|
16
|
-
[:be]
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def self.holidays_by_month
|
|
20
|
-
{
|
|
21
|
-
0 => [{:function => "easter(year)", :function_arguments => [:year], :name => "Pâques", :regions => [:be]},
|
|
22
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lundi de Pâques", :regions => [:be]},
|
|
23
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Ascension", :regions => [:be]},
|
|
24
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Pentecôte", :regions => [:be]},
|
|
25
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lundi de Pentecôte", :regions => [:be]}],
|
|
26
|
-
1 => [{:mday => 1, :name => "Jour de l'an", :regions => [:be]}],
|
|
27
|
-
5 => [{:mday => 1, :name => "Fête du travail", :regions => [:be]}],
|
|
28
|
-
7 => [{:mday => 21, :name => "Fête nationale", :regions => [:be]}],
|
|
29
|
-
8 => [{:mday => 15, :name => "Assomption", :regions => [:be]}],
|
|
30
|
-
11 => [{:mday => 1, :name => "Toussaint", :regions => [:be]},
|
|
31
|
-
{:mday => 11, :name => "Armistice 1918", :regions => [:be]}],
|
|
32
|
-
12 => [{:mday => 25, :name => "Noël", :regions => [:be]}]
|
|
33
|
-
}
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def self.custom_methods
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
module Holidays
|
|
3
|
-
# This file is generated by the Ruby Holidays gem.
|
|
4
|
-
#
|
|
5
|
-
# Definitions loaded: definitions/el.yaml
|
|
6
|
-
#
|
|
7
|
-
# All the definitions are available at https://github.com/holidays/holidays
|
|
8
|
-
module EL # :nodoc:
|
|
9
|
-
def self.defined_regions
|
|
10
|
-
[:el]
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def self.holidays_by_month
|
|
14
|
-
{
|
|
15
|
-
0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Μεγάλη Παρασκευή", :regions => [:el]},
|
|
16
|
-
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Μεγάλο Σάββατο", :regions => [:el]},
|
|
17
|
-
{:function => "orthodox_easter(year)", :function_arguments => [:year], :name => "Κυριακή του Πάσχα", :regions => [:el]},
|
|
18
|
-
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Δευτέρα του Πάσχα", :regions => [:el]},
|
|
19
|
-
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -48, :name => "Καθαρά Δευτέρα", :regions => [:el]},
|
|
20
|
-
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Αγίου Πνεύματος", :regions => [:el]}],
|
|
21
|
-
1 => [{:mday => 1, :name => "Πρωτοχρονιά", :regions => [:el]},
|
|
22
|
-
{:mday => 6, :name => "Θεοφάνεια", :regions => [:el]}],
|
|
23
|
-
3 => [{:mday => 25, :name => "Επέτειος της Επανάστασης του 1821", :regions => [:el]}],
|
|
24
|
-
5 => [{:mday => 1, :name => "Πρωτομαγιά", :regions => [:el]}],
|
|
25
|
-
8 => [{:mday => 15, :name => "Κοίμηση της Θεοτόκου", :regions => [:el]}],
|
|
26
|
-
10 => [{:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]}],
|
|
27
|
-
12 => [{:mday => 25, :name => "Χριστούγεννα", :regions => [:el]},
|
|
28
|
-
{:mday => 26, :name => "Δεύτερη ημέρα των Χριστουγέννων", :regions => [:el]}]
|
|
29
|
-
}
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def self.custom_methods
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|