Module: Holidays::PH

Defined in:
lib/generated_definitions/ph.rb

Overview

This file is generated by the Ruby Holidays gem.

Definitions loaded: definitions/ph.yaml

To use the definitions in this file, load it right after you load the Holiday gem:

require 'holidays'
require 'generated_definitions/ph'

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

Class Method Summary collapse

Class Method Details

.custom_methodsObject


40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/generated_definitions/ph.rb', line 40

def self.custom_methods
  {
    "ph_heroes_day(year)" => Proc.new { |year|
date = Date.new(year, 8, -1)

if date.wday != 1
  date -= date.wday - 1
end

date
},


  }
end

.defined_regionsObject


15
16
17
# File 'lib/generated_definitions/ph.rb', line 15

def self.defined_regions
  [:ph]
end

.holidays_by_monthObject


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/generated_definitions/ph.rb', line 19

def self.holidays_by_month
  {
          0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Maundy Thursday", :regions => [:ph]},
        {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:ph]},
        {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Holy Saturday", :regions => [:ph]},
        {:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:ph]}],
  1 => [{:mday => 1, :name => "New Year’s Day", :regions => [:ph]}],
  2 => [{:mday => 25, :type => :informal, :name => "People Power Anniversary", :regions => [:ph]}],
  4 => [{:mday => 9, :name => "The Day of Valor", :regions => [:ph]}],
  5 => [{:mday => 1, :name => "Labor Day", :regions => [:ph]}],
  6 => [{:mday => 12, :name => "Independence Day", :regions => [:ph]}],
  8 => [{:mday => 21, :name => "Ninoy Aquino Day", :regions => [:ph]},
        {:function => "ph_heroes_day(year)", :function_arguments => [:year], :name => "National Heroes Day", :regions => [:ph]}],
  11 => [{:mday => 1, :type => :informal, :name => "All Saints Day", :regions => [:ph]},
        {:mday => 30, :name => "Bonifacio Day", :regions => [:ph]}],
  12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ph]},
        {:mday => 30, :name => "Rizal Day", :regions => [:ph]},
        {:mday => 31, :name => "New Year's Eve", :regions => [:ph]}]
  }
end