Skip to content

Commit

Permalink
Add other churches holiday to CL Region
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Lavandero committed Aug 14, 2017
1 parent 9d0b0ff commit 6513c88
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion cl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ months:
function: st_peter_st_paul_cl(year)
year_ranges:
- after: 2000
- name: Día de las Iglesias Evangélicas y Protestantes
regions: [cl]
function: other_churches_day_cl(year)
year_ranges:
- after: 2008
1:
- name: Año Nuevo
regions: [cl]
Expand Down Expand Up @@ -101,7 +106,18 @@ methods:
end
date
other_churches_day_cl:
arguments: year
# If on tuesday, friday before, if on wednesday, next friday
source: |
date = Date.civil(year, 10, 31)
if date.wday == 2
date -= 4
elsif date.wday == 3
date += 2
end
date
tests:
- given:
date: '2014-01-01'
Expand Down Expand Up @@ -254,7 +270,7 @@ tests:
expect:
name: "Encuentro de Dos Mundos"
- given:
date: '2014-10-31'
date: '2017-10-27'
regions: ["cl"]
options: ["informal"]
expect:
Expand Down

0 comments on commit 6513c88

Please sign in to comment.