0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/discourse-calendar/vendor/holidays/lib/generated_definitions/ph.rb
2025-07-15 16:38:05 +02:00

50 lines
2.1 KiB
Ruby
Vendored
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# encoding: utf-8
module Holidays
# This file is generated by the Ruby Holidays gem.
#
# Definitions loaded: definitions/ph.yaml
#
# All the definitions are available at https://github.com/holidays/holidays
module PH # :nodoc:
def self.defined_regions
[:ph]
end
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 Years 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
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
end
end