Module: Holidays::CL

Defined in:
lib/generated_definitions/cl.rb

Overview

This file is generated by the Ruby Holidays gem.

Definitions loaded: definitions/cl.yaml

All the definitions are available at github.com/holidays/holidays

Class Method Summary collapse

Class Method Details

.custom_methodsObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/generated_definitions/cl.rb', line 35

def self.custom_methods
  {
      "st_peter_st_paul_cl(year)" => Proc.new { |year|
date = Date.civil(year, 6, 29)
if [2,3,4].include?(date.wday)
  date -= (date.wday - 1)
elsif date.wday == 5
  date += 3
end
date
},

"columbus_day_cl(year)" => Proc.new { |year|
date = Date.civil(year, 10, 12)
if [2,3,4].include?(date.wday)
  date -= (date.wday - 1)
elsif date.wday == 5
  date += 3
end
date
},

"other_churches_day_cl(year)" => Proc.new { |year|
date = Date.civil(year, 10, 31)
if date.wday == 2
  date -= 4
elsif date.wday == 3
  date += 2
end
date
},


  }
end

.defined_regionsObject

:nodoc:



9
10
11
# File 'lib/generated_definitions/cl.rb', line 9

def self.defined_regions
  [:cl]
end

.holidays_by_monthObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/generated_definitions/cl.rb', line 13

def self.holidays_by_month
  {
            0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:cl]},
        {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Sábado Santo", :regions => [:cl]},
        {:function => "st_peter_st_paul_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "San Pedro y San Pablo", :regions => [:cl]},
        {:function => "other_churches_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2008 },:name => "Día de las Iglesias Evangélicas y Protestantes", :regions => [:cl]}],
  1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:cl]}],
  5 => [{:mday => 1, :name => "Día del Trabajo", :regions => [:cl]},
        {:mday => 21, :name => "Día de las Glorias Navales", :regions => [:cl]}],
  6 => [{:mday => 29, :year_ranges => { :until => 1999 },:name => "San Pedro y San Pablo", :regions => [:cl]}],
  7 => [{:mday => 16, :name => "Día de la Virgen del Carmen", :regions => [:cl]}],
  8 => [{:mday => 15, :name => "Asunción de la Virgen", :regions => [:cl]}],
  9 => [{:mday => 18, :name => "Independencia Nacional", :regions => [:cl]},
        {:mday => 19, :name => "Día de las Glorias del Ejército", :regions => [:cl]}],
  10 => [{:mday => 12, :year_ranges => { :until => 1999 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
        {:function => "columbus_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "Encuentro de Dos Mundos", :regions => [:cl]}],
  11 => [{:mday => 1, :name => "Día de Todos los Santos", :regions => [:cl]}],
  12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:cl]},
        {:mday => 25, :name => "Navidad", :regions => [:cl]}]
  }
end