holidays 6.4.0 → 6.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 211587fa0f6cc9770aa844987375a9c4494f9268
4
- data.tar.gz: 195e0a198d61ded54df5dd59b19abedbf54b0e48
2
+ SHA256:
3
+ metadata.gz: 6b334c3ebec3562f4855ca608d4cd685dc223bad374bb4e15dcd64a61b3abe0d
4
+ data.tar.gz: bd53c8ff4bc93522c6ac997080a5315e38b3e10cd66654cfeade2674bb1e8249
5
5
  SHA512:
6
- metadata.gz: 819cc7b8eca33162c12031432f60d91b2f9d848a26c385d2c126b810b5534ab3279408a025d4571d7700d0a3ad15f3694454d2180c44f0cb2d67607d64185a01
7
- data.tar.gz: 1463973d2d30e143217e2049c8a353c6cf8582051b7007cde8e27d252c40a4016a2a772c4714be05c60ca8c2b8c226f8891f625ffa44d17126088decfdfebe48
6
+ metadata.gz: 124f5e256062ec52db46603b8854bd3eafcdabb699b77e26766c9bd3d7aba51bc821b9438051956f451b8aec47b83e0f6fccf2855b38cf5862c0262799c8c51b
7
+ data.tar.gz: 8412d3f181987241a802e64d5a6b562e6ef89f9336f05c4d281df4b84eb6c03e6728d403b3666323a9ebaa8bed703db8d0e40eae4d48cc1412be004a36182954
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Ruby Holidays Gem CHANGELOG
2
2
 
3
+ ## 6.5.0
4
+
5
+ * Update to [v2.5.2 definitions](https://github.com/holidays/definitions/releases/tag/v2.5.2). Please see the changelog for the definition details.
6
+ * Fix permissions on `bin` executables (thanks to github.com/JuanitoFatas)
7
+
3
8
  ## 6.4.0
4
9
 
5
10
  * Update to [v2.4.0 definitions](https://github.com/holidays/definitions/releases/tag/v2.4.0). Please see the changelog for the definition details.
data/bin/console CHANGED
File without changes
data/bin/setup CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/bin/bash
2
2
  set -euo pipefail
3
3
  IFS=$'\n\t'
4
+ set -vx
4
5
 
5
6
  bundle install
@@ -13,6 +13,7 @@ The following definition files are included in this installation:
13
13
  * generated_definitions/ca
14
14
  * generated_definitions/ch
15
15
  * generated_definitions/cl
16
+ * generated_definitions/co
16
17
  * generated_definitions/cr
17
18
  * generated_definitions/cz
18
19
  * generated_definitions/de
@@ -63,6 +64,7 @@ The following definition files are included in this installation:
63
64
  * generated_definitions/sg
64
65
  * generated_definitions/si
65
66
  * generated_definitions/sk
67
+ * generated_definitions/south_america
66
68
  * generated_definitions/tn
67
69
  * generated_definitions/tr
68
70
  * generated_definitions/united_nations
@@ -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, :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_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :ecb_target, :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, :federal_reserve, :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, :kr, :li, :lt, :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, :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_il, :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_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, :united_nations, :ups, :za, :sk, :si, :jp, :ve, :vi, :sg, :my]
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_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :de_hb, :de_hh, :de_ni, :de_sh, :ecb_target, :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, :federal_reserve, :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, :kr, :li, :lt, :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, :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_il, :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_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, :united_nations, :ups, :za, :ve, :sk, :si, :jp, :vi, :sg, :my]
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=>:ca, :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, :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_by_cath=>:de, :de_by_augsburg=>:de, :de_bb=>:de, :de_mv=>:de, :de_th=>:de, :ecb_target=>:ecb_target, :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, :federal_reserve=>:federal_reserve, :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, :kr=>:kr, :li=>:li, :lt=>:lt, :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, :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_il=>: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_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, :united_nations=>:united_nations, :ups=>:ups, :za=>:za, :sk=>:europe, :si=>:europe, :jp=>:jp, :ve=>:ve, :vi=>:vi, :sg=>:sg, :my=>:my}
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=>:ca, :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_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, :ecb_target=>:ecb_target, :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, :federal_reserve=>:federal_reserve, :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, :kr=>:kr, :li=>:li, :lt=>:lt, :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, :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_il=>: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_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, :united_nations=>:united_nations, :ups=>:ups, :za=>:za, :ve=>:south_america, :sk=>:europe, :si=>:europe, :jp=>:jp, :vi=>:vi, :sg=>:sg, :my=>:my}
6
6
  end
@@ -12,10 +12,10 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:ar]}],
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:ar]},
16
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :name => "Carnaval Lunes", :regions => [:ar]},
17
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Carnaval Martes", :regions => [:ar]}],
16
18
  1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:ar]}],
17
- 2 => [{:mday => 8, :name => "Carnaval", :regions => [:ar]},
18
- {:mday => 9, :name => "Carnaval", :regions => [:ar]}],
19
19
  3 => [{:mday => 24, :name => "Día Nacional de la Memoria por la Verdad y la Justicia", :regions => [:ar]}],
20
20
  4 => [{:mday => 2, :name => "Día del Veterano y de los Caídos en la Guerra de Malvinas", :regions => [:ar]}],
21
21
  5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:ar]},
@@ -0,0 +1,121 @@
1
+ # encoding: utf-8
2
+ module Holidays
3
+ # This file is generated by the Ruby Holidays gem.
4
+ #
5
+ # Definitions loaded: definitions/co.yaml
6
+ #
7
+ # All the definitions are available at https://github.com/holidays/holidays
8
+ module CO # :nodoc:
9
+ def self.defined_regions
10
+ [:co]
11
+ end
12
+
13
+ def self.holidays_by_month
14
+ {
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:co]},
16
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:co]},
17
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 43, :name => "Día de la Ascensión", :regions => [:co]},
18
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 64, :name => "Corpus Christi", :regions => [:co]},
19
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 71, :name => "Sagrado Corazón", :regions => [:co]}],
20
+ 1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:co]},
21
+ {:function => "epiphany(year)", :function_arguments => [:year], :name => "Día de los Reyes Magos", :regions => [:co]}],
22
+ 3 => [{:function => "saint_josephs_day(year)", :function_arguments => [:year], :name => "Día de San José", :regions => [:co]}],
23
+ 5 => [{:mday => 1, :name => "Día del Trabajo", :regions => [:co]}],
24
+ 6 => [{:function => "saint_peter_and_saint_paul(year)", :function_arguments => [:year], :name => "San Pedro y San Pablo", :regions => [:co]}],
25
+ 7 => [{:mday => 20, :name => "Día de la Independencia", :regions => [:co]}],
26
+ 8 => [{:mday => 7, :name => "Batalla de Boyacá", :regions => [:co]},
27
+ {:function => "assumption_of_mary(year)", :function_arguments => [:year], :name => "La Asunción de la Virgen", :regions => [:co]}],
28
+ 10 => [{:function => "columbus_day(year)", :function_arguments => [:year], :name => "Día de la Raza", :regions => [:co]}],
29
+ 11 => [{:function => "all_saints_day(year)", :function_arguments => [:year], :name => "Día de Todos los Santos", :regions => [:co]},
30
+ {:function => "independence_of_cartagena(year)", :function_arguments => [:year], :name => "Independencia de Cartagena", :regions => [:co]}],
31
+ 12 => [{:mday => 8, :name => "Día de la Inmaculada Concepción", :regions => [:co]},
32
+ {:mday => 25, :name => "Navidad", :regions => [:co]}]
33
+ }
34
+ end
35
+
36
+ def self.custom_methods
37
+ {
38
+ "to_following_monday_if_not_monday(date)" => Proc.new { |date|
39
+ if date.wday > 1
40
+ date += ( 8 - date.wday )
41
+ elsif date.wday == 0
42
+ date += 1
43
+ end
44
+ date
45
+ },
46
+
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
+
118
+ }
119
+ end
120
+ end
121
+ end
@@ -7,7 +7,7 @@ module Holidays
7
7
  # All the definitions are available at https://github.com/holidays/holidays
8
8
  module DE # :nodoc:
9
9
  def self.defined_regions
10
- [:de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th]
10
+ [:de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :de_hb, :de_hh, :de_ni, :de_sh]
11
11
  end
12
12
 
13
13
  def self.holidays_by_month
@@ -30,7 +30,8 @@ module Holidays
30
30
  10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
31
31
  {:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
32
32
  {:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
33
- {:mday => 31, :year_ranges => [{:limited => [2017]}],:name => "Reformationstag", :regions => [:de]}],
33
+ {:mday => 31, :year_ranges => [{:limited => [2017]}],:name => "Reformationstag", :regions => [:de]},
34
+ {:mday => 31, :year_ranges => [{:after => 2018}],:name => "Reformationstag", :regions => [:de_hb, :de_hh, :de_ni, :de_sh]}],
34
35
  11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
35
36
  {:function => "de_buss_und_bettag(year)", :function_arguments => [:year], :name => "Buß- und Bettag", :regions => [:de_sn]}],
36
37
  12 => [{:mday => 24, :type => :informal, :name => "Heilig Abend", :regions => [:de]},
@@ -33,7 +33,8 @@ module Holidays
33
33
  9 => [{:mday => 2, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Ceuta", :regions => [:es_ce]},
34
34
  {:mday => 8, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Asturias", :regions => [:es_o]},
35
35
  {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
36
- {:mday => 11, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
36
+ {:mday => 11, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]},
37
+ {:mday => 24, :name => "La Mercè", :regions => [:es_ct]}],
37
38
  10 => [{:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
38
39
  {:mday => 12, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Hispanidad", :regions => [:es]}],
39
40
  11 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Todos los Santos", :regions => [:es]}],
@@ -7,7 +7,7 @@ module Holidays
7
7
  # All the definitions are available at https://github.com/holidays/holidays
8
8
  module EUROPE # :nodoc:
9
9
  def self.defined_regions
10
- [:at, :be_fr, :be_nl, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_ne, :ch_ge, :ch_ju, :ch_vs, :ch, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :el, :es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex, :es, :es_ct, :es_v, :es_vc, :fr_a, :fr_m, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :gb_con, :im, :gb_iom, :hr, :hu, :ie, :is, :it, :li, :lt, :nl, :no, :pl, :pt, :pt_li, :pt_po, :ro, :sk, :si, :bg_en, :bg_bg]
10
+ [:at, :be_fr, :be_nl, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_ne, :ch_ge, :ch_ju, :ch_vs, :ch, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :de_hb, :de_hh, :de_ni, :de_sh, :el, :es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex, :es, :es_ct, :es_v, :es_vc, :fr_a, :fr_m, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :gb_con, :im, :gb_iom, :hr, :hu, :ie, :is, :it, :li, :lt, :nl, :no, :pl, :pt, :pt_li, :pt_po, :ro, :sk, :si, :bg_en, :bg_bg]
11
11
  end
12
12
 
13
13
  def self.holidays_by_month
@@ -270,6 +270,7 @@ module Holidays
270
270
  {:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
271
271
  {:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
272
272
  {:mday => 31, :year_ranges => [{:limited => [2017]}],:name => "Reformationstag", :regions => [:de]},
273
+ {:mday => 31, :year_ranges => [{:after => 2018}],:name => "Reformationstag", :regions => [:de_hb, :de_hh, :de_ni, :de_sh]},
273
274
  {:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]},
274
275
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
275
276
  {:mday => 12, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Hispanidad", :regions => [:es]},
@@ -457,6 +458,7 @@ module Holidays
457
458
  {:mday => 8, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Asturias", :regions => [:es_o]},
458
459
  {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
459
460
  {:mday => 11, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]},
461
+ {:mday => 24, :name => "La Mercè", :regions => [:es_ct]},
460
462
  {:mday => 8, :name => "Maria Geburt", :regions => [:li]},
461
463
  {:mday => 30, :type => :informal, :name => "Dzień Chłopaka", :regions => [:pl]},
462
464
  {:mday => 1, :name => "Deň Ústavy Slovenskej republiky", :regions => [:sk]},
@@ -12,16 +12,16 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:federal_reserve]},
15
+ 1 => [{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:federal_reserve]},
16
16
  {:wday => 1, :week => 3, :name => "Birthday of Martin Luther King, Jr", :regions => [:federal_reserve]}],
17
17
  2 => [{:wday => 1, :week => 3, :name => "Washington's Birthday", :regions => [:federal_reserve]}],
18
18
  5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:federal_reserve]}],
19
- 7 => [{:mday => 4, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federal_reserve]}],
19
+ 7 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federal_reserve]}],
20
20
  9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:federal_reserve]}],
21
21
  10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:federal_reserve]}],
22
- 11 => [{:mday => 11, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Veterans Day", :regions => [:federal_reserve]},
22
+ 11 => [{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Veterans Day", :regions => [:federal_reserve]},
23
23
  {:wday => 4, :week => 4, :name => "Thanksgiving Day", :regions => [:federal_reserve]}],
24
- 12 => [{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:federal_reserve]}]
24
+ 12 => [{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:federal_reserve]}]
25
25
  }
26
26
  end
27
27
 
@@ -16,7 +16,9 @@ module Holidays
16
16
  {:wday => 1, :week => 2, :name => "成人の日", :regions => [:jp]},
17
17
  {:mday => 1, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]}],
18
18
  2 => [{:mday => 11, :name => "建国記念の日", :regions => [:jp]},
19
- {:mday => 11, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]}],
19
+ {:mday => 11, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]},
20
+ {:mday => 23, :year_ranges => [{:after => 2020}],:name => "天皇誕生日", :regions => [:jp]},
21
+ {:mday => 23, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :year_ranges => [{:after => 2020}],:name => "振替休日", :regions => [:jp]}],
20
22
  3 => [{:function => "jp_vernal_equinox_day(year)", :function_arguments => [:year], :name => "春分の日", :regions => [:jp]},
21
23
  {:function => "jp_vernal_equinox_day_substitute(year)", :function_arguments => [:year], :name => "振替休日", :regions => [:jp]}],
22
24
  4 => [{:mday => 29, :name => "昭和の日", :regions => [:jp]},
@@ -43,8 +45,8 @@ module Holidays
43
45
  {:mday => 3, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]},
44
46
  {:mday => 23, :name => "勤労感謝の日", :regions => [:jp]},
45
47
  {:mday => 23, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]}],
46
- 12 => [{:mday => 23, :name => "天皇誕生日", :regions => [:jp]},
47
- {:mday => 23, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]}]
48
+ 12 => [{:mday => 23, :year_ranges => [{:before => 2018}],:name => "天皇誕生日", :regions => [:jp]},
49
+ {:mday => 23, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :year_ranges => [{:before => 2018}],:name => "振替休日", :regions => [:jp]}]
48
50
  }
49
51
  end
50
52
 
@@ -0,0 +1,231 @@
1
+ # encoding: utf-8
2
+ module Holidays
3
+ # This file is generated by the Ruby Holidays gem.
4
+ #
5
+ # Definitions loaded: definitions/ar.yaml, definitions/br.yaml, definitions/cl.yaml, definitions/co.yaml, definitions/pe.yaml, definitions/ve.yaml
6
+ #
7
+ # All the definitions are available at https://github.com/holidays/holidays
8
+ module SOUTH_AMERICA # :nodoc:
9
+ def self.defined_regions
10
+ [:ar, :br, :cl, :co, :pe, :ve]
11
+ end
12
+
13
+ def self.holidays_by_month
14
+ {
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:ar]},
16
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :name => "Carnaval Lunes", :regions => [:ar]},
17
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Carnaval Martes", :regions => [:ar]},
18
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :type => :informal, :name => "Carnaval", :regions => [:br]},
19
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Sexta-feira Santa", :regions => [:br]},
20
+ {:function => "easter(year)", :function_arguments => [:year], :name => "Páscoa", :regions => [:br]},
21
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Corpus Christi", :regions => [:br]},
22
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:cl]},
23
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Sábado Santo", :regions => [:cl]},
24
+ {:function => "st_peter_st_paul_cl(year)", :function_arguments => [:year], :year_ranges => [{:after => 2000}],:name => "San Pedro y San Pablo", :regions => [:cl]},
25
+ {:function => "other_churches_day_cl(year)", :function_arguments => [:year], :year_ranges => [{:after => 2008}],:name => "Día de las Iglesias Evangélicas y Protestantes", :regions => [:cl]},
26
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:co]},
27
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:co]},
28
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 43, :name => "Día de la Ascensión", :regions => [:co]},
29
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 64, :name => "Corpus Christi", :regions => [:co]},
30
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 71, :name => "Sagrado Corazón", :regions => [:co]},
31
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:pe]},
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]},
34
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :name => "Lunes Carnaval", :regions => [:ve]},
35
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Martes Carnaval", :regions => [:ve]},
36
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:ve]},
37
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:ve]}],
38
+ 1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:ar]},
39
+ {:mday => 1, :name => "Dia da Confraternização Universal", :regions => [:br]},
40
+ {:mday => 1, :name => "Año Nuevo", :regions => [:cl]},
41
+ {:mday => 1, :name => "Año Nuevo", :regions => [:co]},
42
+ {:function => "epiphany(year)", :function_arguments => [:year], :name => "Día de los Reyes Magos", :regions => [:co]},
43
+ {:mday => 1, :name => "Año Nuevo", :regions => [:pe]},
44
+ {:mday => 6, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de los Reyes Magos", :regions => [:pe]},
45
+ {:mday => 1, :name => "Año Nuevo", :regions => [:ve]}],
46
+ 3 => [{:mday => 24, :name => "Día Nacional de la Memoria por la Verdad y la Justicia", :regions => [:ar]},
47
+ {:function => "saint_josephs_day(year)", :function_arguments => [:year], :name => "Día de San José", :regions => [:co]}],
48
+ 4 => [{:mday => 2, :name => "Día del Veterano y de los Caídos en la Guerra de Malvinas", :regions => [:ar]},
49
+ {:mday => 21, :name => "Dia de Tiradentes", :regions => [:br]},
50
+ {:mday => 19, :name => "Declaración Independencia", :regions => [:ve]}],
51
+ 5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:ar]},
52
+ {:mday => 25, :name => "Día de la Revolución de Mayo", :regions => [:ar]},
53
+ {:mday => 1, :name => "Dia do Trabalho", :regions => [:br]},
54
+ {:mday => 1, :name => "Día del Trabajo", :regions => [:cl]},
55
+ {:mday => 21, :name => "Día de las Glorias Navales", :regions => [:cl]},
56
+ {:mday => 1, :name => "Día del Trabajo", :regions => [:co]},
57
+ {:mday => 1, :name => "Día del Trabajador", :regions => [:pe]},
58
+ {:wday => 0, :week => 2, :type => :informal, :name => "Día de la Madre", :regions => [:pe]},
59
+ {:mday => 1, :name => "Día del Trabajador", :regions => [:ve]}],
60
+ 6 => [{:mday => 20, :name => "Día de la Bandera", :regions => [:ar]},
61
+ {:mday => 29, :year_ranges => [{:before => 1999}],:name => "San Pedro y San Pablo", :regions => [:cl]},
62
+ {:function => "saint_peter_and_saint_paul(year)", :function_arguments => [:year], :name => "San Pedro y San Pablo", :regions => [:co]},
63
+ {:mday => 7, :type => :informal, :name => "Día de la Bandera", :regions => [:pe]},
64
+ {:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:pe]},
65
+ {:mday => 24, :type => :informal, :name => "Inti Raymi", :regions => [:pe]},
66
+ {:mday => 29, :name => "San Pablo y San Pedro", :regions => [:pe]},
67
+ {:mday => 24, :name => "Aniversario Batalla de Carabobo", :regions => [:ve]}],
68
+ 7 => [{:mday => 8, :name => "Feriado puente turístico", :regions => [:ar]},
69
+ {:mday => 9, :name => "Día de la Independencia", :regions => [:ar]},
70
+ {:mday => 16, :name => "Día de la Virgen del Carmen", :regions => [:cl]},
71
+ {:mday => 20, :name => "Día de la Independencia", :regions => [:co]},
72
+ {:mday => 28, :name => "Primer Día de la Independencia", :regions => [:pe]},
73
+ {:mday => 29, :name => "Segundo Día de la Independencia", :regions => [:pe]},
74
+ {:mday => 5, :name => "Día de la Independencia", :regions => [:ve]},
75
+ {:mday => 24, :name => "Natalicio de Simón Bolívar", :regions => [:ve]}],
76
+ 8 => [{:mday => 15, :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]},
77
+ {:mday => 15, :name => "Asunción de la Virgen", :regions => [:cl]},
78
+ {:mday => 7, :name => "Batalla de Boyacá", :regions => [:co]},
79
+ {:function => "assumption_of_mary(year)", :function_arguments => [:year], :name => "La Asunción de la Virgen", :regions => [:co]},
80
+ {:mday => 30, :name => "Santa Rosa de Lima", :regions => [:pe]}],
81
+ 10 => [{:mday => 12, :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
82
+ {:mday => 12, :name => "Dia de Nossa Senhora Aparecida", :regions => [:br]},
83
+ {:mday => 12, :year_ranges => [{:before => 1999}],:name => "Encuentro de Dos Mundos", :regions => [:cl]},
84
+ {:function => "columbus_day_cl(year)", :function_arguments => [:year], :year_ranges => [{:after => 2000}],:name => "Encuentro de Dos Mundos", :regions => [:cl]},
85
+ {:function => "columbus_day(year)", :function_arguments => [:year], :name => "Día de la Raza", :regions => [:co]},
86
+ {:mday => 8, :name => "Batalla de Angamos", :regions => [:pe]},
87
+ {:mday => 12, :name => "Día de la Resistencia Indígena", :regions => [:ve]}],
88
+ 11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]},
89
+ {:mday => 2, :name => "Dia de Finados", :regions => [:br]},
90
+ {:mday => 15, :name => "Proclamação da República", :regions => [:br]},
91
+ {:mday => 1, :name => "Día de Todos los Santos", :regions => [:cl]},
92
+ {:function => "all_saints_day(year)", :function_arguments => [:year], :name => "Día de Todos los Santos", :regions => [:co]},
93
+ {:function => "independence_of_cartagena(year)", :function_arguments => [:year], :name => "Independencia de Cartagena", :regions => [:co]},
94
+ {:mday => 1, :name => "Todos los Santos", :regions => [:pe]}],
95
+ 12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:ar]},
96
+ {:mday => 9, :name => "Feriado puente turístico", :regions => [:ar]},
97
+ {:mday => 25, :name => "Navidad", :regions => [:ar]},
98
+ {:mday => 25, :name => "Natal", :regions => [:br]},
99
+ {:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:cl]},
100
+ {:mday => 25, :name => "Navidad", :regions => [:cl]},
101
+ {:mday => 8, :name => "Día de la Inmaculada Concepción", :regions => [:co]},
102
+ {:mday => 25, :name => "Navidad", :regions => [:co]},
103
+ {:mday => 8, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Inmaculada Concepción", :regions => [:pe]},
104
+ {:mday => 25, :name => "Navidad del Señor", :regions => [:pe]},
105
+ {:mday => 25, :name => "Día de Navidad", :regions => [:ve]}],
106
+ 9 => [{:mday => 7, :name => "Proclamação da Independência", :regions => [:br]},
107
+ {:mday => 18, :name => "Independencia Nacional", :regions => [:cl]},
108
+ {:mday => 19, :name => "Día de las Glorias del Ejército", :regions => [:cl]},
109
+ {:mday => 24, :type => :informal, :name => "Día de las Fuerzas Armadas", :regions => [:pe]}]
110
+ }
111
+ end
112
+
113
+ def self.custom_methods
114
+ {
115
+ "st_peter_st_paul_cl(year)" => Proc.new { |year|
116
+ date = Date.civil(year, 6, 29)
117
+ if [2,3,4].include?(date.wday)
118
+ date -= (date.wday - 1)
119
+ elsif date.wday == 5
120
+ date += 3
121
+ end
122
+
123
+ date
124
+ },
125
+
126
+ "columbus_day_cl(year)" => Proc.new { |year|
127
+ date = Date.civil(year, 10, 12)
128
+ if [2,3,4].include?(date.wday)
129
+ date -= (date.wday - 1)
130
+ elsif date.wday == 5
131
+ date += 3
132
+ end
133
+
134
+ date
135
+ },
136
+
137
+ "other_churches_day_cl(year)" => Proc.new { |year|
138
+ date = Date.civil(year, 10, 31)
139
+ if date.wday == 2
140
+ date -= 4
141
+ elsif date.wday == 3
142
+ date += 2
143
+ end
144
+
145
+ date
146
+ },
147
+
148
+ "to_following_monday_if_not_monday(date)" => Proc.new { |date|
149
+ if date.wday > 1
150
+ date += ( 8 - date.wday )
151
+ elsif date.wday == 0
152
+ date += 1
153
+ end
154
+ date
155
+ },
156
+
157
+ "epiphany(year)" => Proc.new { |year|
158
+ date = Date.civil( year, 1, 6 )
159
+ if date.wday > 1
160
+ date += ( 8 - date.wday )
161
+ elsif date.wday == 0
162
+ date += 1
163
+ end
164
+ date
165
+ },
166
+
167
+ "saint_josephs_day(year)" => Proc.new { |year|
168
+ date = Date.civil( year, 3, 19 )
169
+ if date.wday > 1
170
+ date += ( 8 - date.wday )
171
+ elsif date.wday == 0
172
+ date += 1
173
+ end
174
+ date
175
+ },
176
+
177
+ "saint_peter_and_saint_paul(year)" => Proc.new { |year|
178
+ date = Date.civil( year, 6, 29 )
179
+ if date.wday > 1
180
+ date += ( 8 - date.wday )
181
+ elsif date.wday == 0
182
+ date += 1
183
+ end
184
+ date
185
+ },
186
+
187
+ "assumption_of_mary(year)" => Proc.new { |year|
188
+ date = Date.civil( year, 8, 15 )
189
+ if date.wday > 1
190
+ date += ( 8 - date.wday )
191
+ elsif date.wday == 0
192
+ date += 1
193
+ end
194
+ date
195
+ },
196
+
197
+ "columbus_day(year)" => Proc.new { |year|
198
+ date = Date.civil( year, 10, 12 )
199
+ if date.wday > 1
200
+ date += ( 8 - date.wday )
201
+ elsif date.wday == 0
202
+ date += 1
203
+ end
204
+ date
205
+ },
206
+
207
+ "all_saints_day(year)" => Proc.new { |year|
208
+ date = Date.civil( year, 11, 1 )
209
+ if date.wday > 1
210
+ date += ( 8 - date.wday )
211
+ elsif date.wday == 0
212
+ date += 1
213
+ end
214
+ date
215
+ },
216
+
217
+ "independence_of_cartagena(year)" => Proc.new { |year|
218
+ date = Date.civil( year, 11, 11 )
219
+ if date.wday > 1
220
+ date += ( 8 - date.wday )
221
+ elsif date.wday == 0
222
+ date += 1
223
+ end
224
+ date
225
+ },
226
+
227
+
228
+ }
229
+ end
230
+ end
231
+ end