Define holidays in methods instead of constants
This commit is contained in:
parent
8f60480c8b
commit
3f23f56c9a
32 changed files with 828 additions and 700 deletions
|
@ -104,29 +104,33 @@ def parse_holiday_defs(module_name, files)
|
||||||
module_src =<<-EOM
|
module_src =<<-EOM
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: #{files.join(', ')}
|
# Definitions loaded: #{files.join(', ')}
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/#{module_name.downcase}'
|
# require 'holidays/#{module_name.downcase}'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module #{module_name} # :nodoc:
|
module #{module_name} # :nodoc:
|
||||||
DEFINED_REGIONS = [:#{regions.flatten.uniq.join(', :')}]
|
def self.defined_regions
|
||||||
|
[:#{regions.flatten.uniq.join(', :')}]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
#{month_strs.join(",\n")}
|
{
|
||||||
}
|
#{month_strs.join(",\n")}
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#{method_str}
|
#{method_str}
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::#{module_name}::DEFINED_REGIONS, Holidays::#{module_name}::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::#{module_name}.defined_regions, Holidays::#{module_name}.holidays_by_month)
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,37 +1,41 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/at.yaml
|
# Definitions loaded: data/at.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/at'
|
# require 'holidays/at'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module AT # :nodoc:
|
module AT # :nodoc:
|
||||||
DEFINED_REGIONS = [:at]
|
def self.defined_regions
|
||||||
|
[:at]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Staatsfeiertag", :regions => [:at]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:at]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:at]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:at]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:at]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:at]},
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:at]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Fronleichnam", :regions => [:at]}],
|
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Fronleichnam", :regions => [:at]}],
|
||||||
|
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:at]}],
|
||||||
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:at]},
|
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:at]},
|
||||||
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:at]}],
|
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:at]}],
|
||||||
5 => [{:mday => 1, :name => "Staatsfeiertag", :regions => [:at]}],
|
|
||||||
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:at]}],
|
|
||||||
10 => [{:mday => 26, :name => "Nationalfeiertag", :regions => [:at]}],
|
|
||||||
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:at]}],
|
|
||||||
12 => [{:mday => 8, :name => "Mariä Empfängnis", :regions => [:at]},
|
12 => [{:mday => 8, :name => "Mariä Empfängnis", :regions => [:at]},
|
||||||
{:mday => 25, :name => "1. Weihnachtstag", :regions => [:at]},
|
{:mday => 25, :name => "1. Weihnachtstag", :regions => [:at]},
|
||||||
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:at]}]
|
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:at]}],
|
||||||
}
|
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:at]}],
|
||||||
|
10 => [{:mday => 26, :name => "Nationalfeiertag", :regions => [:at]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::AT::DEFINED_REGIONS, Holidays::AT::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::AT.defined_regions, Holidays::AT.holidays_by_month)
|
||||||
|
|
|
@ -1,43 +1,47 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/au.yaml
|
# Definitions loaded: data/au.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/au'
|
# require 'holidays/au'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module AU # :nodoc:
|
module AU # :nodoc:
|
||||||
DEFINED_REGIONS = [:au, :au_tas, :au_wa, :au_vic, :au_qld, :au_nt, :au_act, :au_nsw, :au_sa, :au_qld_brisbane]
|
def self.defined_regions
|
||||||
|
[:au_qld, :au_nt, :au, :au_tas, :au_wa, :au_act, :au_nsw, :au_sa, :au_vic, :au_qld_brisbane]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_qld]},
|
||||||
|
{:wday => 1, :week => 1, :name => "May Day", :regions => [:au_nt]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:au]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:au]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Easter Saturday", :regions => [:au]},
|
{:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Easter Saturday", :regions => [:au]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:au]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:au]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+2 }, :function_id => "easter(year)+2", :name => "Easter Monday", :regions => [:au_tas]}],
|
{:function => lambda { |year| Holidays.easter(year)+2 }, :function_id => "easter(year)+2", :name => "Easter Monday", :regions => [:au_tas]}],
|
||||||
|
6 => [{:wday => 1, :week => 1, :name => "Foundation Day", :regions => [:au_wa]},
|
||||||
|
{:wday => 1, :week => 2, :name => "Queen's Birthday", :regions => [:au_act, :au_nsw, :au_sa, :au_tas, :au_nt, :au_qld, :au_vic]},
|
||||||
|
{:mday => 6, :type => :informal, :name => "Queensland Day", :regions => [:au_qld]}],
|
||||||
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:au]},
|
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:au]},
|
||||||
{:mday => 26, :name => "Australia Day", :regions => [:au]}],
|
{:mday => 26, :name => "Australia Day", :regions => [:au]}],
|
||||||
|
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:au]},
|
||||||
|
{:mday => 26, :name => "Boxing Day", :regions => [:au]}],
|
||||||
|
8 => [{:wday => 3, :week => -3, :name => "Ekka", :regions => [:au_qld_brisbane]}],
|
||||||
3 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_wa]},
|
3 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_wa]},
|
||||||
{:wday => 1, :week => 2, :name => "Eight Hours Day", :regions => [:au_tas]},
|
{:wday => 1, :week => 2, :name => "Eight Hours Day", :regions => [:au_tas]},
|
||||||
{:wday => 1, :week => 2, :name => "Labour Day", :regions => [:au_vic]}],
|
{:wday => 1, :week => 2, :name => "Labour Day", :regions => [:au_vic]}],
|
||||||
4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au]}],
|
4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au]}],
|
||||||
5 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_qld]},
|
10 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_act, :au_nsw, :au_sa]}]
|
||||||
{:wday => 1, :week => 1, :name => "May Day", :regions => [:au_nt]}],
|
}
|
||||||
6 => [{:wday => 1, :week => 1, :name => "Foundation Day", :regions => [:au_wa]},
|
end
|
||||||
{:wday => 1, :week => 2, :name => "Queen's Birthday", :regions => [:au_act, :au_nsw, :au_sa, :au_tas, :au_nt, :au_qld, :au_vic]},
|
|
||||||
{:mday => 6, :type => :informal, :name => "Queensland Day", :regions => [:au_qld]}],
|
|
||||||
8 => [{:wday => 3, :week => -3, :name => "Ekka", :regions => [:au_qld_brisbane]}],
|
|
||||||
10 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_act, :au_nsw, :au_sa]}],
|
|
||||||
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:au]},
|
|
||||||
{:mday => 26, :name => "Boxing Day", :regions => [:au]}]
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::AU::DEFINED_REGIONS, Holidays::AU::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::AU.defined_regions, Holidays::AU.holidays_by_month)
|
||||||
|
|
|
@ -1,36 +1,40 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/br.yaml
|
# Definitions loaded: data/br.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/br'
|
# require 'holidays/br'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module BR # :nodoc:
|
module BR # :nodoc:
|
||||||
DEFINED_REGIONS = [:br]
|
def self.defined_regions
|
||||||
|
[:br]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Dia do Trabalho", :regions => [:br]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:br]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:br]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:br]},
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:br]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:br]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:br]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpus Christ", :regions => [:br]}],
|
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpus Christ", :regions => [:br]}],
|
||||||
1 => [{:mday => 1, :name => "Dia da Confraternização Universal", :regions => [:br]}],
|
|
||||||
4 => [{:mday => 21, :name => "Dia de Tiradentes", :regions => [:br]}],
|
|
||||||
5 => [{:mday => 1, :name => "Dia do Trabalho", :regions => [:br]}],
|
|
||||||
9 => [{:mday => 7, :name => "Proclamação da Independência", :regions => [:br]}],
|
|
||||||
10 => [{:mday => 12, :name => "Dia de Nossa Senhora Aparecida", :regions => [:br]}],
|
|
||||||
11 => [{:mday => 2, :name => "Dia de Finados", :regions => [:br]},
|
11 => [{:mday => 2, :name => "Dia de Finados", :regions => [:br]},
|
||||||
{:mday => 15, :name => "Proclamação da República", :regions => [:br]}],
|
{:mday => 15, :name => "Proclamação da República", :regions => [:br]}],
|
||||||
12 => [{:mday => 25, :name => "Natal", :regions => [:br]}]
|
1 => [{:mday => 1, :name => "Dia da Confraternização Universal", :regions => [:br]}],
|
||||||
}
|
12 => [{:mday => 25, :name => "Natal", :regions => [:br]}],
|
||||||
|
9 => [{:mday => 7, :name => "Proclamação da Independência", :regions => [:br]}],
|
||||||
|
4 => [{:mday => 21, :name => "Dia de Tiradentes", :regions => [:br]}],
|
||||||
|
10 => [{:mday => 12, :name => "Dia de Nossa Senhora Aparecida", :regions => [:br]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::BR::DEFINED_REGIONS, Holidays::BR::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::BR.defined_regions, Holidays::BR.holidays_by_month)
|
||||||
|
|
|
@ -1,54 +1,58 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/ca.yaml, data/north_america_informal.yaml
|
# Definitions loaded: data/ca.yaml, data/north_america_informal.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/ca'
|
# require 'holidays/ca'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module CA # :nodoc:
|
module CA # :nodoc:
|
||||||
DEFINED_REGIONS = [:ca, :ca_qc, :ca_ab, :ca_on, :ca_sk, :ca_mb, :ca_nf, :ca_nt, :ca_nu, :ca_bc, :ca_ns, :ca_yk, :us]
|
def self.defined_regions
|
||||||
|
[:ca, :ca_qc, :ca_nf, :ca_nt, :ca_nu, :ca_ab, :ca_on, :ca_sk, :ca_mb, :ca_bc, :ca_ns, :ca_yk, :us]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "Victoria Day", :regions => [:ca]},
|
||||||
|
{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "National Patriotes Day", :regions => [:ca_qc]},
|
||||||
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:ca]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:ca]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :type => :informal, :name => "Easter Monday", :regions => [:ca]}],
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :type => :informal, :name => "Easter Monday", :regions => [:ca]}],
|
||||||
|
11 => [{:mday => 11, :name => "Remembrance Day", :regions => [:ca]}],
|
||||||
|
6 => [{:mday => 24, :name => "Discovery Day", :regions => [:ca_nf]},
|
||||||
|
{:mday => 24, :name => "Fête Nationale", :regions => [:ca_qc]},
|
||||||
|
{:mday => 21, :name => "National Aboriginal Day", :regions => [:ca_nt]}],
|
||||||
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ca]},
|
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ca]},
|
||||||
{:mday => 2, :name => "New Year's", :regions => [:ca_qc]}],
|
{:mday => 2, :name => "New Year's", :regions => [:ca_qc]}],
|
||||||
|
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ca]},
|
||||||
|
{:mday => 26, :name => "Boxing Day", :regions => [:ca]}],
|
||||||
|
7 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Canada Day", :regions => [:ca]},
|
||||||
|
{:mday => 12, :name => "Orangemen's Day", :regions => [:ca_nf]},
|
||||||
|
{:mday => 9, :name => "Nunavut Day", :regions => [:ca_nu]}],
|
||||||
2 => [{:wday => 1, :week => 3, :name => "Family Day", :regions => [:ca_ab, :ca_on, :ca_sk]},
|
2 => [{:wday => 1, :week => 3, :name => "Family Day", :regions => [:ca_ab, :ca_on, :ca_sk]},
|
||||||
{:wday => 1, :week => 3, :name => "Louis Riel Day", :regions => [:ca_mb]},
|
{:wday => 1, :week => 3, :name => "Louis Riel Day", :regions => [:ca_mb]},
|
||||||
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
||||||
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
||||||
3 => [{:mday => 23, :name => "St. George's Day", :regions => [:ca_nf]},
|
|
||||||
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
|
||||||
5 => [{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "Victoria Day", :regions => [:ca]},
|
|
||||||
{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "National Patriotes Day", :regions => [:ca_qc]},
|
|
||||||
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
|
||||||
6 => [{:mday => 24, :name => "Discovery Day", :regions => [:ca_nf]},
|
|
||||||
{:mday => 24, :name => "Fête Nationale", :regions => [:ca_qc]},
|
|
||||||
{:mday => 21, :name => "National Aboriginal Day", :regions => [:ca_nt]}],
|
|
||||||
7 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Canada Day", :regions => [:ca]},
|
|
||||||
{:mday => 12, :name => "Orangemen's Day", :regions => [:ca_nf]},
|
|
||||||
{:mday => 9, :name => "Nunavut Day", :regions => [:ca_nu]}],
|
|
||||||
8 => [{:wday => 1, :week => 1, :name => "BC Day", :regions => [:ca_bc]},
|
8 => [{:wday => 1, :week => 1, :name => "BC Day", :regions => [:ca_bc]},
|
||||||
{:wday => 1, :week => 1, :name => "Saskatchewan Day", :regions => [:ca_sk]},
|
{:wday => 1, :week => 1, :name => "Saskatchewan Day", :regions => [:ca_sk]},
|
||||||
{:wday => 1, :week => 1, :name => "Heritage Day", :regions => [:ca_ab]},
|
{:wday => 1, :week => 1, :name => "Heritage Day", :regions => [:ca_ab]},
|
||||||
{:wday => 1, :week => 1, :name => "Natal Day", :regions => [:ca_ns]},
|
{:wday => 1, :week => 1, :name => "Natal Day", :regions => [:ca_ns]},
|
||||||
{:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_on]},
|
{:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_on]},
|
||||||
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yk]}],
|
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yk]}],
|
||||||
|
3 => [{:mday => 23, :name => "St. George's Day", :regions => [:ca_nf]},
|
||||||
|
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
||||||
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]}],
|
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]}],
|
||||||
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca]},
|
|
||||||
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
|
|
||||||
11 => [{:mday => 11, :name => "Remembrance Day", :regions => [:ca]}],
|
|
||||||
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ca]},
|
|
||||||
{:mday => 26, :name => "Boxing Day", :regions => [:ca]}],
|
|
||||||
4 => [{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
4 => [{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
||||||
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}]
|
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}],
|
||||||
}
|
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca]},
|
||||||
|
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Monday on or before May 24
|
# Monday on or before May 24
|
||||||
|
@ -66,4 +70,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::CA::DEFINED_REGIONS, Holidays::CA::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::CA.defined_regions, Holidays::CA.holidays_by_month)
|
||||||
|
|
|
@ -1,36 +1,40 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/cz.yaml
|
# Definitions loaded: data/cz.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/cz'
|
# require 'holidays/cz'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module CZ # :nodoc:
|
module CZ # :nodoc:
|
||||||
DEFINED_REGIONS = [:cz]
|
def self.defined_regions
|
||||||
|
[:cz]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Velikonoční pondělí", :regions => [:cz]}],
|
{
|
||||||
1 => [{:mday => 1, :name => "Den obnovy samostatného českého státu", :regions => [:cz]}],
|
5 => [{:mday => 1, :name => "Svátek práce", :regions => [:cz]},
|
||||||
5 => [{:mday => 1, :name => "Svátek práce", :regions => [:cz]},
|
|
||||||
{:mday => 8, :name => "Den vítězství", :regions => [:cz]}],
|
{:mday => 8, :name => "Den vítězství", :regions => [:cz]}],
|
||||||
|
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Velikonoční pondělí", :regions => [:cz]}],
|
||||||
|
11 => [{:mday => 17, :name => "Den boje za svobodu a demokracii", :regions => [:cz]}],
|
||||||
|
1 => [{:mday => 1, :name => "Den obnovy samostatného českého státu", :regions => [:cz]}],
|
||||||
|
12 => [{:mday => 24, :name => "Štědrý den", :regions => [:cz]},
|
||||||
|
{:mday => 25, :name => "1. svátek vánoční", :regions => [:cz]},
|
||||||
|
{:mday => 26, :name => "2. svátek vánoční", :regions => [:cz]}],
|
||||||
7 => [{:mday => 5, :name => "Den slovanských věrozvěstů Cyrila a Metoděje", :regions => [:cz]},
|
7 => [{:mday => 5, :name => "Den slovanských věrozvěstů Cyrila a Metoděje", :regions => [:cz]},
|
||||||
{:mday => 6, :name => "Den upálení mistra Jana Husa", :regions => [:cz]}],
|
{:mday => 6, :name => "Den upálení mistra Jana Husa", :regions => [:cz]}],
|
||||||
9 => [{:mday => 28, :name => "Den české státnosti", :regions => [:cz]}],
|
9 => [{:mday => 28, :name => "Den české státnosti", :regions => [:cz]}],
|
||||||
10 => [{:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]}],
|
10 => [{:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]}]
|
||||||
11 => [{:mday => 17, :name => "Den boje za svobodu a demokracii", :regions => [:cz]}],
|
}
|
||||||
12 => [{:mday => 24, :name => "Štědrý den", :regions => [:cz]},
|
end
|
||||||
{:mday => 25, :name => "1. svátek vánoční", :regions => [:cz]},
|
|
||||||
{:mday => 26, :name => "2. svátek vánoční", :regions => [:cz]}]
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::CZ::DEFINED_REGIONS, Holidays::CZ::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::CZ.defined_regions, Holidays::CZ.holidays_by_month)
|
||||||
|
|
|
@ -1,36 +1,40 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/de.yaml
|
# Definitions loaded: data/de.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/de'
|
# require 'holidays/de'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module DE # :nodoc:
|
module DE # :nodoc:
|
||||||
DEFINED_REGIONS = [:de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_st, :de_bb, :de_mv, :de_sn, :de_th]
|
def self.defined_regions
|
||||||
|
[:de, :de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_sn, :de_he, :de_st, :de_bb, :de_mv, :de_th]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Karfreitag", :regions => [:de]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Karfreitag", :regions => [:de]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:de]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:de]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:de]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:de]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:de]},
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:de]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl]}],
|
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl]}],
|
||||||
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:de]},
|
|
||||||
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]}],
|
|
||||||
5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]}],
|
|
||||||
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]}],
|
|
||||||
10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
|
||||||
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]}],
|
|
||||||
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
|
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
|
||||||
{:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_sn]}],
|
{:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_sn]}],
|
||||||
|
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:de]},
|
||||||
|
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]}],
|
||||||
12 => [{:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
|
12 => [{:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
|
||||||
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]}]
|
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]}],
|
||||||
}
|
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]}],
|
||||||
|
10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
||||||
|
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Germany: Wednesday before November 23
|
# Germany: Wednesday before November 23
|
||||||
|
@ -48,4 +52,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::DE::DEFINED_REGIONS, Holidays::DE::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::DE.defined_regions, Holidays::DE.holidays_by_month)
|
||||||
|
|
|
@ -1,20 +1,25 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/dk.yaml
|
# Definitions loaded: data/dk.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/dk'
|
# require 'holidays/dk'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module DK # :nodoc:
|
module DK # :nodoc:
|
||||||
DEFINED_REGIONS = [:dk]
|
def self.defined_regions
|
||||||
|
[:dk]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
|
||||||
|
{:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
|
||||||
|
@ -25,24 +30,23 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]}],
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]}],
|
||||||
1 => [{:mday => 1, :name => "Nytårsdag", :regions => [:dk]}],
|
11 => [{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]}],
|
||||||
4 => [{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
|
|
||||||
{:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
|
|
||||||
{:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]}],
|
|
||||||
5 => [{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
|
|
||||||
{:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]}],
|
|
||||||
6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
|
6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
|
||||||
{:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
|
{:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
|
||||||
{:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]}],
|
{:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]}],
|
||||||
11 => [{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]}],
|
1 => [{:mday => 1, :name => "Nytårsdag", :regions => [:dk]}],
|
||||||
12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
|
12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
|
||||||
{:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
|
{:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
|
||||||
{:mday => 25, :name => "1. juledag", :regions => [:dk]},
|
{:mday => 25, :name => "1. juledag", :regions => [:dk]},
|
||||||
{:mday => 26, :name => "2. juledag", :regions => [:dk]}]
|
{:mday => 26, :name => "2. juledag", :regions => [:dk]}],
|
||||||
}
|
4 => [{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
|
||||||
|
{:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
|
||||||
|
{:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::DK::DEFINED_REGIONS, Holidays::DK::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::DK.defined_regions, Holidays::DK.holidays_by_month)
|
||||||
|
|
|
@ -1,20 +1,24 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/el.yaml
|
# Definitions loaded: data/el.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/el'
|
# require 'holidays/el'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module EL # :nodoc:
|
module EL # :nodoc:
|
||||||
DEFINED_REGIONS = [:el]
|
def self.defined_regions
|
||||||
|
[:el]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Πρωτομαγιά", :regions => [:el]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.orthodox_easter(year)-2 }, :function_id => "orthodox_easter(year)-2", :name => "Μεγάλη Παρασκευή", :regions => [:el]},
|
0 => [{:function => lambda { |year| Holidays.orthodox_easter(year)-2 }, :function_id => "orthodox_easter(year)-2", :name => "Μεγάλη Παρασκευή", :regions => [:el]},
|
||||||
{:function => lambda { |year| Holidays.orthodox_easter(year)-1 }, :function_id => "orthodox_easter(year)-1", :name => "Μεγάλο Σάββατο", :regions => [:el]},
|
{:function => lambda { |year| Holidays.orthodox_easter(year)-1 }, :function_id => "orthodox_easter(year)-1", :name => "Μεγάλο Σάββατο", :regions => [:el]},
|
||||||
{:function => lambda { |year| Holidays.orthodox_easter(year) }, :function_id => "orthodox_easter(year)", :name => "Κυριακή του Πάσχα", :regions => [:el]},
|
{:function => lambda { |year| Holidays.orthodox_easter(year) }, :function_id => "orthodox_easter(year)", :name => "Κυριακή του Πάσχα", :regions => [:el]},
|
||||||
|
@ -23,16 +27,16 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.orthodox_easter(year)+50 }, :function_id => "orthodox_easter(year)+50", :name => "Αγίου Πνεύματος", :regions => [:el]}],
|
{:function => lambda { |year| Holidays.orthodox_easter(year)+50 }, :function_id => "orthodox_easter(year)+50", :name => "Αγίου Πνεύματος", :regions => [:el]}],
|
||||||
1 => [{:mday => 1, :name => "Πρωτοχρονιά", :regions => [:el]},
|
1 => [{:mday => 1, :name => "Πρωτοχρονιά", :regions => [:el]},
|
||||||
{:mday => 6, :name => "Θεοφάνεια", :regions => [:el]}],
|
{:mday => 6, :name => "Θεοφάνεια", :regions => [:el]}],
|
||||||
3 => [{:mday => 25, :name => "Επέτειος της Επανάστασης του 1821", :regions => [:el]}],
|
|
||||||
5 => [{:mday => 1, :name => "Πρωτομαγιά", :regions => [:el]}],
|
|
||||||
8 => [{:mday => 15, :name => "Κοίμηση της Θεοτόκου", :regions => [:el]}],
|
|
||||||
10 => [{:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]}],
|
|
||||||
12 => [{:mday => 25, :name => "Χριστούγεννα", :regions => [:el]},
|
12 => [{:mday => 25, :name => "Χριστούγεννα", :regions => [:el]},
|
||||||
{:mday => 26, :name => "Δεύτερη ημέρα των Χριστουγέννων", :regions => [:el]}]
|
{:mday => 26, :name => "Δεύτερη ημέρα των Χριστουγέννων", :regions => [:el]}],
|
||||||
}
|
8 => [{:mday => 15, :name => "Κοίμηση της Θεοτόκου", :regions => [:el]}],
|
||||||
|
3 => [{:mday => 25, :name => "Επέτειος της Επανάστασης του 1821", :regions => [:el]}],
|
||||||
|
10 => [{:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::EL::DEFINED_REGIONS, Holidays::EL::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::EL.defined_regions, Holidays::EL.holidays_by_month)
|
||||||
|
|
|
@ -1,53 +1,57 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/es.yaml
|
# Definitions loaded: data/es.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/es'
|
# require 'holidays/es'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module ES # :nodoc:
|
module ES # :nodoc:
|
||||||
DEFINED_REGIONS = [:es_pv, :es_ct, :es_na, :es_v, :es_vc, :es, :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]
|
def self.defined_regions
|
||||||
|
[:es, :es_m, :es_cn, :es_cm, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_mu, :es_lo, :es_ib, :es_ga, :es_an, :es_ce, :es_o, :es_ex, :es_ar, :es_cl]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
|
{
|
||||||
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
|
5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}],
|
|
||||||
1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:es]},
|
|
||||||
{:mday => 6, :name => "Día de Reyes", :regions => [:es]}],
|
|
||||||
2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]}],
|
|
||||||
3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
|
|
||||||
{:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]}],
|
|
||||||
4 => [{:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
|
|
||||||
{:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]}],
|
|
||||||
5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
|
|
||||||
{:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
|
{:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
|
||||||
{:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
|
{:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
|
||||||
{:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
|
{:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
|
||||||
|
0 => [{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
|
||||||
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}],
|
||||||
|
11 => [{:mday => 1, :name => "Todos los Santos", :regions => [:es]}],
|
||||||
6 => [{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
|
6 => [{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
|
||||||
{:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]}],
|
{:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]}],
|
||||||
|
1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:es]},
|
||||||
|
{:mday => 6, :name => "Día de Reyes", :regions => [:es]}],
|
||||||
|
12 => [{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
|
||||||
|
{:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
|
||||||
|
{:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
|
||||||
|
{:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]}],
|
||||||
7 => [{:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]}],
|
7 => [{:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]}],
|
||||||
|
2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]}],
|
||||||
8 => [{:mday => 15, :name => "Asunción", :regions => [:es]}],
|
8 => [{:mday => 15, :name => "Asunción", :regions => [:es]}],
|
||||||
|
3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
|
||||||
|
{:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]}],
|
||||||
9 => [{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
|
9 => [{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
|
||||||
{:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
|
{:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
|
||||||
{:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
|
{:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
|
||||||
{:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
|
{:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
|
||||||
|
4 => [{:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
|
||||||
|
{:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]}],
|
||||||
10 => [{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
|
10 => [{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
|
||||||
{:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]}],
|
{:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]}]
|
||||||
11 => [{:mday => 1, :name => "Todos los Santos", :regions => [:es]}],
|
}
|
||||||
12 => [{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
|
end
|
||||||
{:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
|
|
||||||
{:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
|
|
||||||
{:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]}]
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::ES::DEFINED_REGIONS, Holidays::ES::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::ES.defined_regions, Holidays::ES.holidays_by_month)
|
||||||
|
|
|
@ -1,20 +1,50 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/at.yaml, data/cz.yaml, data/dk.yaml, data/de.yaml, data/el.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/no.yaml, data/pl.yaml, data/pt.yaml
|
# Definitions loaded: data/at.yaml, data/cz.yaml, data/dk.yaml, data/de.yaml, data/el.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/no.yaml, data/pl.yaml, data/pt.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/europe'
|
# require 'holidays/europe'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module Europe # :nodoc:
|
module Europe # :nodoc:
|
||||||
DEFINED_REGIONS = [:at, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :cz, :dk, :no, :de_st, :de_bb, :de_mv, :de_sn, :de_th, :el, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es, :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, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :ie, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom, :is, :it, :nl, :pl, :pt]
|
def self.defined_regions
|
||||||
|
[:at, :de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de, :de_he, :cz, :dk, :no, :de_sn, :de_st, :de_bb, :de_mv, :de_th, :el, :es, :es_m, :es_cn, :es_cm, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_mu, :es_lo, :es_ib, :es_ga, :es_an, :es_ce, :es_o, :es_ex, :es_ar, :es_cl, :fr, :gb, :ie, :je, :gb_jsy, :gg, :gb_gsy, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :im, :gb_iom, :gb_con, :is, :it, :nl, :pl, :pt]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Staatsfeiertag", :regions => [:at]},
|
||||||
|
{:mday => 1, :name => "Svátek práce", :regions => [:cz]},
|
||||||
|
{:mday => 8, :name => "Den vítězství", :regions => [:cz]},
|
||||||
|
{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
|
||||||
|
{:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]},
|
||||||
|
{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
|
||||||
|
{:mday => 1, :name => "Πρωτομαγιά", :regions => [:el]},
|
||||||
|
{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
|
||||||
|
{:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
|
||||||
|
{:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
|
||||||
|
{:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]},
|
||||||
|
{:mday => 1, :name => "Fête du travail", :regions => [:fr]},
|
||||||
|
{:mday => 8, :name => "Victoire 1945", :regions => [:fr]},
|
||||||
|
{:wday => 1, :week => 1, :name => "May Day", :regions => [:gb, :ie]},
|
||||||
|
{:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
|
||||||
|
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]},
|
||||||
|
{:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
|
||||||
|
{:mday => 13, :name => "Mæðradagurinn", :regions => [:is]},
|
||||||
|
{:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]},
|
||||||
|
{:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
|
||||||
|
{:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
|
||||||
|
{:mday => 1, :name => "1. mai", :regions => [:no]},
|
||||||
|
{:mday => 17, :name => "17. mai", :regions => [:no]},
|
||||||
|
{:mday => 1, :name => "Święto Państwowe (Święto Pracy)", :regions => [:pl]},
|
||||||
|
{:mday => 2, :type => :informal, :name => "Dzień Flagi Rzeczpospolitej Polskiej", :regions => [:pl]},
|
||||||
|
{:mday => 3, :name => "Święto Narodowe Trzeciego Maja", :regions => [:pl]},
|
||||||
|
{:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:at, :de]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:at, :de]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:at, :de]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:at, :de]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:at, :de]},
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:at, :de]},
|
||||||
|
@ -86,6 +116,32 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpo de Deus", :regions => [:pt]}],
|
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpo de Deus", :regions => [:pt]}],
|
||||||
|
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:at, :de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
|
||||||
|
{:mday => 17, :name => "Den boje za svobodu a demokracii", :regions => [:cz]},
|
||||||
|
{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
|
||||||
|
{:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_sn]},
|
||||||
|
{:mday => 1, :name => "Todos los Santos", :regions => [:es]},
|
||||||
|
{:mday => 1, :name => "Toussaint", :regions => [:fr]},
|
||||||
|
{:mday => 11, :name => "Armistice 1918", :regions => [:fr]},
|
||||||
|
{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
|
||||||
|
{:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]},
|
||||||
|
{:mday => 1, :name => "Ognissanti", :regions => [:it]},
|
||||||
|
{:mday => 1, :name => "Wszystkich Świętych", :regions => [:pl]},
|
||||||
|
{:mday => 2, :type => :informal, :name => "Dzień Zaduszny", :regions => [:pl]},
|
||||||
|
{:mday => 11, :name => "Narodowe Święto Niepodległości", :regions => [:pl]},
|
||||||
|
{:mday => 29, :type => :informal, :name => "Andrzejki", :regions => [:pl]},
|
||||||
|
{:mday => 1, :name => "Todos os Santos", :regions => [:pt]}],
|
||||||
|
6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
|
||||||
|
{:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
|
||||||
|
{:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
|
||||||
|
{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
|
||||||
|
{:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]},
|
||||||
|
{:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
|
||||||
|
{:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
|
||||||
|
{:mday => 2, :name => "Festa della Repubblica", :regions => [:it]},
|
||||||
|
{:mday => 23, :type => :informal, :name => "Dzień Ojca", :regions => [:pl]},
|
||||||
|
{:mday => 10, :name => "Dia de Portugal", :regions => [:pt]}],
|
||||||
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:at, :de]},
|
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:at, :de]},
|
||||||
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:at]},
|
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:at]},
|
||||||
{:mday => 1, :name => "Den obnovy samostatného českého státu", :regions => [:cz]},
|
{:mday => 1, :name => "Den obnovy samostatného českého státu", :regions => [:cz]},
|
||||||
|
@ -111,70 +167,6 @@ module Holidays
|
||||||
{:mday => 21, :type => :informal, :name => "Dzień Babci", :regions => [:pl]},
|
{:mday => 21, :type => :informal, :name => "Dzień Babci", :regions => [:pl]},
|
||||||
{:mday => 22, :type => :informal, :name => "Dzień Dziadka", :regions => [:pl]},
|
{:mday => 22, :type => :informal, :name => "Dzień Dziadka", :regions => [:pl]},
|
||||||
{:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
|
{:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
|
||||||
5 => [{:mday => 1, :name => "Staatsfeiertag", :regions => [:at]},
|
|
||||||
{:mday => 1, :name => "Svátek práce", :regions => [:cz]},
|
|
||||||
{:mday => 8, :name => "Den vítězství", :regions => [:cz]},
|
|
||||||
{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
|
|
||||||
{:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]},
|
|
||||||
{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
|
|
||||||
{:mday => 1, :name => "Πρωτομαγιά", :regions => [:el]},
|
|
||||||
{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
|
|
||||||
{:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
|
|
||||||
{:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
|
|
||||||
{:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]},
|
|
||||||
{:mday => 1, :name => "Fête du travail", :regions => [:fr]},
|
|
||||||
{:mday => 8, :name => "Victoire 1945", :regions => [:fr]},
|
|
||||||
{:wday => 1, :week => 1, :name => "May Day", :regions => [:gb, :ie]},
|
|
||||||
{:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
|
|
||||||
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]},
|
|
||||||
{:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
|
|
||||||
{:mday => 13, :name => "Mæðradagurinn", :regions => [:is]},
|
|
||||||
{:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]},
|
|
||||||
{:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
|
|
||||||
{:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
|
|
||||||
{:mday => 1, :name => "1. mai", :regions => [:no]},
|
|
||||||
{:mday => 17, :name => "17. mai", :regions => [:no]},
|
|
||||||
{:mday => 1, :name => "Święto Państwowe (Święto Pracy)", :regions => [:pl]},
|
|
||||||
{:mday => 2, :type => :informal, :name => "Dzień Flagi Rzeczpospolitej Polskiej", :regions => [:pl]},
|
|
||||||
{:mday => 3, :name => "Święto Narodowe Trzeciego Maja", :regions => [:pl]},
|
|
||||||
{:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
|
|
||||||
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:at]},
|
|
||||||
{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]},
|
|
||||||
{:mday => 15, :name => "Κοίμηση της Θεοτόκου", :regions => [:el]},
|
|
||||||
{:mday => 15, :name => "Asunción", :regions => [:es]},
|
|
||||||
{:mday => 15, :name => "Assomption", :regions => [:fr]},
|
|
||||||
{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct, :ie]},
|
|
||||||
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]},
|
|
||||||
{:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]},
|
|
||||||
{:mday => 15, :name => "Assunzione", :regions => [:it]},
|
|
||||||
{:mday => 15, :name => "Wniebowzięcie Najświętszej Maryi Panny", :regions => [:pl]},
|
|
||||||
{:mday => 15, :name => "Święto Wojska Polskiego", :regions => [:pl]},
|
|
||||||
{:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]}],
|
|
||||||
10 => [{:mday => 26, :name => "Nationalfeiertag", :regions => [:at]},
|
|
||||||
{:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]},
|
|
||||||
{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
|
||||||
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
|
|
||||||
{:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]},
|
|
||||||
{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
|
|
||||||
{:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]},
|
|
||||||
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:ie]},
|
|
||||||
{:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]},
|
|
||||||
{:mday => 5, :name => "Implantação da República", :regions => [:pt]}],
|
|
||||||
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:at, :de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
|
|
||||||
{:mday => 17, :name => "Den boje za svobodu a demokracii", :regions => [:cz]},
|
|
||||||
{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
|
|
||||||
{:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_sn]},
|
|
||||||
{:mday => 1, :name => "Todos los Santos", :regions => [:es]},
|
|
||||||
{:mday => 1, :name => "Toussaint", :regions => [:fr]},
|
|
||||||
{:mday => 11, :name => "Armistice 1918", :regions => [:fr]},
|
|
||||||
{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
|
|
||||||
{:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]},
|
|
||||||
{:mday => 1, :name => "Ognissanti", :regions => [:it]},
|
|
||||||
{:mday => 1, :name => "Wszystkich Świętych", :regions => [:pl]},
|
|
||||||
{:mday => 2, :type => :informal, :name => "Dzień Zaduszny", :regions => [:pl]},
|
|
||||||
{:mday => 11, :name => "Narodowe Święto Niepodległości", :regions => [:pl]},
|
|
||||||
{:mday => 29, :type => :informal, :name => "Andrzejki", :regions => [:pl]},
|
|
||||||
{:mday => 1, :name => "Todos os Santos", :regions => [:pt]}],
|
|
||||||
12 => [{:mday => 8, :name => "Mariä Empfängnis", :regions => [:at]},
|
12 => [{:mday => 8, :name => "Mariä Empfängnis", :regions => [:at]},
|
||||||
{:mday => 25, :name => "1. Weihnachtstag", :regions => [:at, :de]},
|
{:mday => 25, :name => "1. Weihnachtstag", :regions => [:at, :de]},
|
||||||
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:at, :de]},
|
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:at, :de]},
|
||||||
|
@ -223,6 +215,29 @@ module Holidays
|
||||||
{:mday => 14, :name => "Fête nationale", :regions => [:fr]},
|
{:mday => 14, :name => "Fête nationale", :regions => [:fr]},
|
||||||
{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
|
{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
|
||||||
{:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
|
{:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
|
||||||
|
2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]},
|
||||||
|
{:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]},
|
||||||
|
{:mday => 2, :type => :informal, :name => "Ofiarowanie Pańskie (Matki Boskiej Gromnicznej)", :regions => [:pl]},
|
||||||
|
{:mday => 14, :type => :informal, :name => "Dzień Zakochanych (Walentynki)", :regions => [:pl]}],
|
||||||
|
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:at]},
|
||||||
|
{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]},
|
||||||
|
{:mday => 15, :name => "Κοίμηση της Θεοτόκου", :regions => [:el]},
|
||||||
|
{:mday => 15, :name => "Asunción", :regions => [:es]},
|
||||||
|
{:mday => 15, :name => "Assomption", :regions => [:fr]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct, :ie]},
|
||||||
|
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]},
|
||||||
|
{:mday => 15, :name => "Assunzione", :regions => [:it]},
|
||||||
|
{:mday => 15, :name => "Wniebowzięcie Najświętszej Maryi Panny", :regions => [:pl]},
|
||||||
|
{:mday => 15, :name => "Święto Wojska Polskiego", :regions => [:pl]},
|
||||||
|
{:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]}],
|
||||||
|
3 => [{:mday => 25, :name => "Επέτειος της Επανάστασης του 1821", :regions => [:el]},
|
||||||
|
{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
|
||||||
|
{:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]},
|
||||||
|
{:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
|
||||||
|
{:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir, :ie]},
|
||||||
|
{:mday => 8, :type => :informal, :name => "Dzień Kobiet", :regions => [:pl]},
|
||||||
|
{:mday => 10, :type => :informal, :name => "Dzień Mężczyzn", :regions => [:pl]}],
|
||||||
9 => [{:mday => 28, :name => "Den české státnosti", :regions => [:cz]},
|
9 => [{:mday => 28, :name => "Den české státnosti", :regions => [:cz]},
|
||||||
{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
|
{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
|
||||||
{:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
|
{:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
|
||||||
|
@ -240,43 +255,20 @@ module Holidays
|
||||||
{:mday => 1, :type => :informal, :name => "Prima Aprilis", :regions => [:pl]},
|
{:mday => 1, :type => :informal, :name => "Prima Aprilis", :regions => [:pl]},
|
||||||
{:mday => 22, :type => :informal, :name => "Międzynarodowy Dzień Ziemi", :regions => [:pl]},
|
{:mday => 22, :type => :informal, :name => "Międzynarodowy Dzień Ziemi", :regions => [:pl]},
|
||||||
{:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]}],
|
{:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]}],
|
||||||
6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
|
10 => [{:mday => 26, :name => "Nationalfeiertag", :regions => [:at]},
|
||||||
{:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
|
{:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]},
|
||||||
{:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
|
{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
||||||
{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
|
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
|
||||||
{:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]},
|
{:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]},
|
||||||
{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]},
|
{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
|
||||||
{:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
|
{:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]},
|
||||||
{:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
|
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:ie]},
|
||||||
{:mday => 2, :name => "Festa della Repubblica", :regions => [:it]},
|
{:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]},
|
||||||
{:mday => 23, :type => :informal, :name => "Dzień Ojca", :regions => [:pl]},
|
{:mday => 5, :name => "Implantação da República", :regions => [:pt]}]
|
||||||
{:mday => 10, :name => "Dia de Portugal", :regions => [:pt]}],
|
}
|
||||||
3 => [{:mday => 25, :name => "Επέτειος της Επανάστασης του 1821", :regions => [:el]},
|
end
|
||||||
{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
|
|
||||||
{:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]},
|
|
||||||
{:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
|
|
||||||
{:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir, :ie]},
|
|
||||||
{:mday => 8, :type => :informal, :name => "Dzień Kobiet", :regions => [:pl]},
|
|
||||||
{:mday => 10, :type => :informal, :name => "Dzień Mężczyzn", :regions => [:pl]}],
|
|
||||||
2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]},
|
|
||||||
{:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]},
|
|
||||||
{:mday => 2, :type => :informal, :name => "Ofiarowanie Pańskie (Matki Boskiej Gromnicznej)", :regions => [:pl]},
|
|
||||||
{:mday => 14, :type => :informal, :name => "Dzień Zakochanych (Walentynki)", :regions => [:pl]}]
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Germany: Wednesday before November 23
|
|
||||||
def self.de_buss_und_bettag(year)
|
|
||||||
date = Date.civil(year,11,23)
|
|
||||||
if date.wday > 3
|
|
||||||
date -= (date.wday - 3)
|
|
||||||
else
|
|
||||||
date -= (date.wday + 4)
|
|
||||||
end
|
|
||||||
date
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
# Iceland: first day of summer (Thursday after 18 April)
|
# Iceland: first day of summer (Thursday after 18 April)
|
||||||
def self.is_sumardagurinn_fyrsti(year)
|
def self.is_sumardagurinn_fyrsti(year)
|
||||||
date = Date.civil(year,4,18)
|
date = Date.civil(year,4,18)
|
||||||
|
@ -289,6 +281,18 @@ def self.is_sumardagurinn_fyrsti(year)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Germany: Wednesday before November 23
|
||||||
|
def self.de_buss_und_bettag(year)
|
||||||
|
date = Date.civil(year,11,23)
|
||||||
|
if date.wday > 3
|
||||||
|
date -= (date.wday - 3)
|
||||||
|
else
|
||||||
|
date -= (date.wday + 4)
|
||||||
|
end
|
||||||
|
date
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# Poland: January 6 is holiday since 2011
|
# Poland: January 6 is holiday since 2011
|
||||||
def self.pl_trzech_kroli(year)
|
def self.pl_trzech_kroli(year)
|
||||||
year >= 2011 ? 6 : nil
|
year >= 2011 ? 6 : nil
|
||||||
|
@ -304,4 +308,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::Europe::DEFINED_REGIONS, Holidays::Europe::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::Europe.defined_regions, Holidays::Europe.holidays_by_month)
|
||||||
|
|
|
@ -1,45 +1,41 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/fi.yaml
|
# Definitions loaded: data/fi.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/fi'
|
# require 'holidays/fi'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module FI # :nodoc:
|
module FI # :nodoc:
|
||||||
DEFINED_REGIONS = [:fi]
|
def self.defined_regions
|
||||||
|
[:fi]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Vappu", :regions => [:fi]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Pitkäperjantai", :regions => [:fi]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Pitkäperjantai", :regions => [:fi]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pääsiäispäivä", :regions => [:fi]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pääsiäispäivä", :regions => [:fi]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. Pääsiäispäivä", :regions => [:fi]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. Pääsiäispäivä", :regions => [:fi]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Helatorstai", :regions => [:fi]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Helatorstai", :regions => [:fi]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Helluntaipäivä", :regions => [:fi]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Helluntaipäivä", :regions => [:fi]},
|
||||||
{:function => lambda { |year| Holidays.fi_pyhainpaiva(year) }, :function_id => "fi_pyhainpaiva(year)", :name => "Pyhäinpäivä", :regions => [:fi]}],
|
{:function => lambda { |year| Holidays.fi_pyhainpaiva(year) }, :function_id => "fi_pyhainpaiva(year)", :name => "Pyhäinpäivä", :regions => [:fi]}],
|
||||||
|
6 => [{:function => lambda { |year| Holidays.fi_juhannuspaiva(year) }, :function_id => "fi_juhannuspaiva(year)", :name => "Juhannuspäivä", :regions => [:fi]}],
|
||||||
1 => [{:mday => 1, :name => "Uudenvuodenpäivä", :regions => [:fi]},
|
1 => [{:mday => 1, :name => "Uudenvuodenpäivä", :regions => [:fi]},
|
||||||
{:mday => 6, :name => "Loppiainen", :regions => [:fi]}],
|
{:mday => 6, :name => "Loppiainen", :regions => [:fi]}],
|
||||||
5 => [{:mday => 1, :name => "Vappu", :regions => [:fi]}],
|
|
||||||
6 => [{:function => lambda { |year| Holidays.fi_juhannuspaiva(year) }, :function_id => "fi_juhannuspaiva(year)", :name => "Juhannuspäivä", :regions => [:fi]}],
|
|
||||||
12 => [{:mday => 6, :name => "Itsenäisyyspäivä", :regions => [:fi]},
|
12 => [{:mday => 6, :name => "Itsenäisyyspäivä", :regions => [:fi]},
|
||||||
{:mday => 24, :name => "Jouluaatto", :regions => [:fi]},
|
{:mday => 24, :name => "Jouluaatto", :regions => [:fi]},
|
||||||
{:mday => 25, :name => "Joulupäivä", :regions => [:fi]},
|
{:mday => 25, :name => "Joulupäivä", :regions => [:fi]},
|
||||||
{:mday => 26, :name => "Tapaninpäivä", :regions => [:fi]}]
|
{:mday => 26, :name => "Tapaninpäivä", :regions => [:fi]}]
|
||||||
}
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Finland: Mid-summer (Saturday between June 20–26)
|
|
||||||
def self.fi_juhannuspaiva(year)
|
|
||||||
date = Date.civil(year,6,20)
|
|
||||||
date += (6 - date.wday)
|
|
||||||
date
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
# Finland: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
# Finland: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
||||||
def self.fi_pyhainpaiva(year)
|
def self.fi_pyhainpaiva(year)
|
||||||
date = Date.civil(year,10,31)
|
date = Date.civil(year,10,31)
|
||||||
|
@ -48,7 +44,15 @@ def self.fi_pyhainpaiva(year)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Finland: Mid-summer (Saturday between June 20–26)
|
||||||
|
def self.fi_juhannuspaiva(year)
|
||||||
|
date = Date.civil(year,6,20)
|
||||||
|
date += (6 - date.wday)
|
||||||
|
date
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::FI::DEFINED_REGIONS, Holidays::FI::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::FI.defined_regions, Holidays::FI.holidays_by_month)
|
||||||
|
|
|
@ -1,37 +1,41 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/fr.yaml
|
# Definitions loaded: data/fr.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/fr'
|
# require 'holidays/fr'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module FR # :nodoc:
|
module FR # :nodoc:
|
||||||
DEFINED_REGIONS = [:fr]
|
def self.defined_regions
|
||||||
|
[:fr]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Fête du travail", :regions => [:fr]},
|
||||||
|
{:mday => 8, :name => "Victoire 1945", :regions => [:fr]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pâques", :regions => [:fr]},
|
0 => [{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pâques", :regions => [:fr]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lundi de Pâques", :regions => [:fr]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lundi de Pâques", :regions => [:fr]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Ascension", :regions => [:fr]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Ascension", :regions => [:fr]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pentecôte", :regions => [:fr]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pentecôte", :regions => [:fr]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Lundi de Pentecôte", :regions => [:fr]}],
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Lundi de Pentecôte", :regions => [:fr]}],
|
||||||
1 => [{:mday => 1, :name => "Jour de l'an", :regions => [:fr]}],
|
|
||||||
5 => [{:mday => 1, :name => "Fête du travail", :regions => [:fr]},
|
|
||||||
{:mday => 8, :name => "Victoire 1945", :regions => [:fr]}],
|
|
||||||
7 => [{:mday => 14, :name => "Fête nationale", :regions => [:fr]}],
|
|
||||||
8 => [{:mday => 15, :name => "Assomption", :regions => [:fr]}],
|
|
||||||
11 => [{:mday => 1, :name => "Toussaint", :regions => [:fr]},
|
11 => [{:mday => 1, :name => "Toussaint", :regions => [:fr]},
|
||||||
{:mday => 11, :name => "Armistice 1918", :regions => [:fr]}],
|
{:mday => 11, :name => "Armistice 1918", :regions => [:fr]}],
|
||||||
12 => [{:mday => 25, :name => "Nöel", :regions => [:fr]}]
|
1 => [{:mday => 1, :name => "Jour de l'an", :regions => [:fr]}],
|
||||||
}
|
12 => [{:mday => 25, :name => "Nöel", :regions => [:fr]}],
|
||||||
|
7 => [{:mday => 14, :name => "Fête nationale", :regions => [:fr]}],
|
||||||
|
8 => [{:mday => 15, :name => "Assomption", :regions => [:fr]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::FR::DEFINED_REGIONS, Holidays::FR::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::FR.defined_regions, Holidays::FR.holidays_by_month)
|
||||||
|
|
|
@ -1,41 +1,45 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/gb.yaml
|
# Definitions loaded: data/gb.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/gb'
|
# require 'holidays/gb'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module GB # :nodoc:
|
module GB # :nodoc:
|
||||||
DEFINED_REGIONS = [:gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom]
|
def self.defined_regions
|
||||||
|
[:gb, :je, :gb_jsy, :gg, :gb_gsy, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :im, :gb_iom, :gb_con]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:wday => 1, :week => 1, :name => "May Day", :regions => [:gb]},
|
||||||
|
{:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
|
||||||
|
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:gb]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:gb]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Easter Sunday", :regions => [:gb]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Easter Sunday", :regions => [:gb]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]}],
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]}],
|
||||||
|
11 => [{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]}],
|
||||||
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:gb]},
|
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:gb]},
|
||||||
{:mday => 2, :name => "New Year's", :regions => [:gb_sct]}],
|
{:mday => 2, :name => "New Year's", :regions => [:gb_sct]}],
|
||||||
3 => [{:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
|
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:gb]},
|
||||||
{:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir]}],
|
{:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:gb]}],
|
||||||
5 => [{:wday => 1, :week => 1, :name => "May Day", :regions => [:gb]},
|
|
||||||
{:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
|
|
||||||
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]}],
|
|
||||||
7 => [{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
|
7 => [{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
|
||||||
{:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
|
{:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
|
||||||
8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
|
8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
|
||||||
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]}],
|
{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]}],
|
||||||
11 => [{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]}],
|
3 => [{:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
|
||||||
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:gb]},
|
{:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir]}]
|
||||||
{:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:gb]}]
|
}
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::GB::DEFINED_REGIONS, Holidays::GB::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::GB.defined_regions, Holidays::GB.holidays_by_month)
|
||||||
|
|
|
@ -1,33 +1,37 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/ie.yaml
|
# Definitions loaded: data/ie.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/ie'
|
# require 'holidays/ie'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module IE # :nodoc:
|
module IE # :nodoc:
|
||||||
DEFINED_REGIONS = [:ie]
|
def self.defined_regions
|
||||||
|
[:ie]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:wday => 1, :week => 1, :name => "May Day", :regions => [:ie]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:ie]}],
|
0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:ie]}],
|
||||||
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ie]}],
|
|
||||||
3 => [{:mday => 17, :name => "St. Patrick's Day", :regions => [:ie]}],
|
|
||||||
5 => [{:wday => 1, :week => 1, :name => "May Day", :regions => [:ie]}],
|
|
||||||
6 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]}],
|
6 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]}],
|
||||||
8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]}],
|
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ie]}],
|
||||||
10 => [{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:ie]}],
|
|
||||||
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ie]},
|
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ie]},
|
||||||
{:mday => 26, :name => "St. Stephen's Day", :regions => [:ie]}]
|
{:mday => 26, :name => "St. Stephen's Day", :regions => [:ie]}],
|
||||||
}
|
8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]}],
|
||||||
|
3 => [{:mday => 17, :name => "St. Patrick's Day", :regions => [:ie]}],
|
||||||
|
10 => [{:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:ie]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::IE::DEFINED_REGIONS, Holidays::IE::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::IE.defined_regions, Holidays::IE.holidays_by_month)
|
||||||
|
|
|
@ -1,20 +1,25 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/is.yaml
|
# Definitions loaded: data/is.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/is'
|
# require 'holidays/is'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module IS # :nodoc:
|
module IS # :nodoc:
|
||||||
DEFINED_REGIONS = [:is]
|
def self.defined_regions
|
||||||
|
[:is]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
|
||||||
|
{:mday => 13, :name => "Mæðradagurinn", :regions => [:is]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-48 }, :function_id => "easter(year)-48", :name => "Bolludagur", :regions => [:is]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-48 }, :function_id => "easter(year)-48", :name => "Bolludagur", :regions => [:is]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :name => "Sprengidagur", :regions => [:is]},
|
{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :name => "Sprengidagur", :regions => [:is]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-46 }, :function_id => "easter(year)-46", :name => "Öskudagur", :regions => [:is]},
|
{:function => lambda { |year| Holidays.easter(year)-46 }, :function_id => "easter(year)-46", :name => "Öskudagur", :regions => [:is]},
|
||||||
|
@ -26,22 +31,21 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Uppstigningardagur", :regions => [:is]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Uppstigningardagur", :regions => [:is]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Hvítasunnudagur", :regions => [:is]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Hvítasunnudagur", :regions => [:is]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Annar í hvítasunnu", :regions => [:is]}],
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Annar í hvítasunnu", :regions => [:is]}],
|
||||||
|
11 => [{:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]}],
|
||||||
|
6 => [{:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
|
||||||
|
{:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]}],
|
||||||
1 => [{:mday => 1, :name => "Nýársdagur", :regions => [:is]},
|
1 => [{:mday => 1, :name => "Nýársdagur", :regions => [:is]},
|
||||||
{:mday => 6, :name => "Þrettándinn", :regions => [:is]},
|
{:mday => 6, :name => "Þrettándinn", :regions => [:is]},
|
||||||
{:mday => 19, :type => :informal, :name => "Bóndadagur", :regions => [:is]}],
|
{:mday => 19, :type => :informal, :name => "Bóndadagur", :regions => [:is]}],
|
||||||
2 => [{:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]}],
|
|
||||||
4 => [{:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]}],
|
|
||||||
5 => [{:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
|
|
||||||
{:mday => 13, :name => "Mæðradagurinn", :regions => [:is]}],
|
|
||||||
6 => [{:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
|
|
||||||
{:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]}],
|
|
||||||
8 => [{:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]}],
|
|
||||||
11 => [{:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]}],
|
|
||||||
12 => [{:mday => 24, :name => "Jól", :regions => [:is]},
|
12 => [{:mday => 24, :name => "Jól", :regions => [:is]},
|
||||||
{:mday => 25, :name => "Jól", :regions => [:is]},
|
{:mday => 25, :name => "Jól", :regions => [:is]},
|
||||||
{:mday => 26, :name => "Jól", :regions => [:is]},
|
{:mday => 26, :name => "Jól", :regions => [:is]},
|
||||||
{:mday => 31, :name => "Gamlárskvöld", :regions => [:is]}]
|
{:mday => 31, :name => "Gamlárskvöld", :regions => [:is]}],
|
||||||
}
|
2 => [{:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]}],
|
||||||
|
8 => [{:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]}],
|
||||||
|
4 => [{:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Iceland: first day of summer (Thursday after 18 April)
|
# Iceland: first day of summer (Thursday after 18 April)
|
||||||
|
@ -59,4 +63,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::IS::DEFINED_REGIONS, Holidays::IS::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::IS.defined_regions, Holidays::IS.holidays_by_month)
|
||||||
|
|
|
@ -1,36 +1,40 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/it.yaml
|
# Definitions loaded: data/it.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/it'
|
# require 'holidays/it'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module IT # :nodoc:
|
module IT # :nodoc:
|
||||||
DEFINED_REGIONS = [:it]
|
def self.defined_regions
|
||||||
|
[:it]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasqua", :regions => [:it]},
|
0 => [{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasqua", :regions => [:it]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunedì dell'Angelo", :regions => [:it]}],
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunedì dell'Angelo", :regions => [:it]}],
|
||||||
|
11 => [{:mday => 1, :name => "Ognissanti", :regions => [:it]}],
|
||||||
|
6 => [{:mday => 2, :name => "Festa della Repubblica", :regions => [:it]}],
|
||||||
1 => [{:mday => 1, :name => "Capodanno", :regions => [:it]},
|
1 => [{:mday => 1, :name => "Capodanno", :regions => [:it]},
|
||||||
{:mday => 6, :name => "Epifania", :regions => [:it]}],
|
{:mday => 6, :name => "Epifania", :regions => [:it]}],
|
||||||
4 => [{:mday => 25, :name => "Festa della Liberazione", :regions => [:it]}],
|
|
||||||
5 => [{:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]}],
|
|
||||||
6 => [{:mday => 2, :name => "Festa della Repubblica", :regions => [:it]}],
|
|
||||||
8 => [{:mday => 15, :name => "Assunzione", :regions => [:it]}],
|
|
||||||
11 => [{:mday => 1, :name => "Ognissanti", :regions => [:it]}],
|
|
||||||
12 => [{:mday => 8, :name => "Immacolata Concezione", :regions => [:it]},
|
12 => [{:mday => 8, :name => "Immacolata Concezione", :regions => [:it]},
|
||||||
{:mday => 25, :name => "Natale", :regions => [:it]},
|
{:mday => 25, :name => "Natale", :regions => [:it]},
|
||||||
{:mday => 26, :name => "Santo Stefano", :regions => [:it]}]
|
{:mday => 26, :name => "Santo Stefano", :regions => [:it]}],
|
||||||
}
|
8 => [{:mday => 15, :name => "Assunzione", :regions => [:it]}],
|
||||||
|
4 => [{:mday => 25, :name => "Festa della Liberazione", :regions => [:it]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::IT::DEFINED_REGIONS, Holidays::IT::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::IT.defined_regions, Holidays::IT.holidays_by_month)
|
||||||
|
|
|
@ -1,68 +1,63 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/jp.yaml
|
# Definitions loaded: data/jp.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/jp'
|
# require 'holidays/jp'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module JP # :nodoc:
|
module JP # :nodoc:
|
||||||
DEFINED_REGIONS = [:jp]
|
def self.defined_regions
|
||||||
|
[:jp]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
1 => [{:mday => 1, :name => "元日", :regions => [:jp]},
|
{
|
||||||
{:wday => 1, :week => 2, :name => "成人の日", :regions => [:jp]}],
|
5 => [{:mday => 3, :name => "憲法記念日", :regions => [:jp]},
|
||||||
2 => [{:mday => 11, :name => "建国記念日", :regions => [:jp]},
|
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 2, 11) }, :function_id => "jp_substitute_holiday(year, 2, 11)", :name => "振替休日", :regions => [:jp]}],
|
|
||||||
3 => [{:function => lambda { |year| Holidays.jp_vernal_equinox_day(year) }, :function_id => "jp_vernal_equinox_day(year)", :name => "春分の日", :regions => [:jp]},
|
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(Holidays.jp_vernal_equinox_day(year)) }, :function_id => "jp_substitute_holiday(Holidays.jp_vernal_equinox_day(year))", :name => "振替休日", :regions => [:jp]}],
|
|
||||||
4 => [{:mday => 29, :name => "昭和の日", :regions => [:jp]},
|
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 4, 29) }, :function_id => "jp_substitute_holiday(year, 4, 29)", :name => "振替休日", :regions => [:jp]}],
|
|
||||||
5 => [{:mday => 3, :name => "憲法記念日", :regions => [:jp]},
|
|
||||||
{:mday => 4, :name => "みどりの日", :regions => [:jp]},
|
{:mday => 4, :name => "みどりの日", :regions => [:jp]},
|
||||||
{:mday => 5, :name => "こどもの日", :regions => [:jp]},
|
{:mday => 5, :name => "こどもの日", :regions => [:jp]},
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 5, 3) }, :function_id => "jp_substitute_holiday(year, 5, 3)", :name => "振替休日", :regions => [:jp]},
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 5, 3) }, :function_id => "jp_substitute_holiday(year, 5, 3)", :name => "振替休日", :regions => [:jp]},
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 5, 5) }, :function_id => "jp_substitute_holiday(year, 5, 5)", :name => "振替休日", :regions => [:jp]}],
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 5, 5) }, :function_id => "jp_substitute_holiday(year, 5, 5)", :name => "振替休日", :regions => [:jp]}],
|
||||||
|
11 => [{:mday => 3, :name => "文化の日", :regions => [:jp]},
|
||||||
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 11, 3) }, :function_id => "jp_substitute_holiday(year, 11, 3)", :name => "振替休日", :regions => [:jp]},
|
||||||
|
{:mday => 23, :name => "勤労感謝の日", :regions => [:jp]},
|
||||||
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 11, 23) }, :function_id => "jp_substitute_holiday(year, 11, 23)", :name => "振替休日", :regions => [:jp]}],
|
||||||
|
1 => [{:mday => 1, :name => "元日", :regions => [:jp]},
|
||||||
|
{:wday => 1, :week => 2, :name => "成人の日", :regions => [:jp]}],
|
||||||
|
12 => [{:mday => 23, :name => "天皇誕生日", :regions => [:jp]},
|
||||||
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 12, 23) }, :function_id => "jp_substitute_holiday(year, 12, 23)", :name => "振替休日", :regions => [:jp]}],
|
||||||
7 => [{:wday => 1, :week => 3, :name => "海の日", :regions => [:jp]},
|
7 => [{:wday => 1, :week => 3, :name => "海の日", :regions => [:jp]},
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 7, Date.calculate_mday(year, 7, 3, 1)) }, :function_id => "jp_substitute_holiday(year, 7, Date.calculate_mday(year, 7, 3, 1))", :name => "振替休日", :regions => [:jp]}],
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 7, Date.calculate_mday(year, 7, 3, 1)) }, :function_id => "jp_substitute_holiday(year, 7, Date.calculate_mday(year, 7, 3, 1))", :name => "振替休日", :regions => [:jp]}],
|
||||||
|
2 => [{:mday => 11, :name => "建国記念日", :regions => [:jp]},
|
||||||
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 2, 11) }, :function_id => "jp_substitute_holiday(year, 2, 11)", :name => "振替休日", :regions => [:jp]}],
|
||||||
|
3 => [{:function => lambda { |year| Holidays.jp_vernal_equinox_day(year) }, :function_id => "jp_vernal_equinox_day(year)", :name => "春分の日", :regions => [:jp]},
|
||||||
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(Holidays.jp_vernal_equinox_day(year)) }, :function_id => "jp_substitute_holiday(Holidays.jp_vernal_equinox_day(year))", :name => "振替休日", :regions => [:jp]}],
|
||||||
9 => [{:wday => 1, :week => 3, :name => "敬老の日", :regions => [:jp]},
|
9 => [{:wday => 1, :week => 3, :name => "敬老の日", :regions => [:jp]},
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 9, Date.calculate_mday(year, 9, 3, 1)) }, :function_id => "jp_substitute_holiday(year, 9, Date.calculate_mday(year, 9, 3, 1))", :name => "振替休日", :regions => [:jp]},
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 9, Date.calculate_mday(year, 9, 3, 1)) }, :function_id => "jp_substitute_holiday(year, 9, Date.calculate_mday(year, 9, 3, 1))", :name => "振替休日", :regions => [:jp]},
|
||||||
{:function => lambda { |year| Holidays.jp_citizons_holiday(year) }, :function_id => "jp_citizons_holiday(year)", :name => "国民の休日", :regions => [:jp]},
|
{:function => lambda { |year| Holidays.jp_citizons_holiday(year) }, :function_id => "jp_citizons_holiday(year)", :name => "国民の休日", :regions => [:jp]},
|
||||||
{:function => lambda { |year| Holidays.jp_national_culture_day(year) }, :function_id => "jp_national_culture_day(year)", :name => "秋分の日", :regions => [:jp]},
|
{:function => lambda { |year| Holidays.jp_national_culture_day(year) }, :function_id => "jp_national_culture_day(year)", :name => "秋分の日", :regions => [:jp]},
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(Holidays.jp_national_culture_day(year)) }, :function_id => "jp_substitute_holiday(Holidays.jp_national_culture_day(year))", :name => "振替休日", :regions => [:jp]}],
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(Holidays.jp_national_culture_day(year)) }, :function_id => "jp_substitute_holiday(Holidays.jp_national_culture_day(year))", :name => "振替休日", :regions => [:jp]}],
|
||||||
|
4 => [{:mday => 29, :name => "昭和の日", :regions => [:jp]},
|
||||||
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 4, 29) }, :function_id => "jp_substitute_holiday(year, 4, 29)", :name => "振替休日", :regions => [:jp]}],
|
||||||
10 => [{:wday => 1, :week => 2, :name => "体育の日", :regions => [:jp]},
|
10 => [{:wday => 1, :week => 2, :name => "体育の日", :regions => [:jp]},
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 10, Date.calculate_mday(year, 10, 2, 1)) }, :function_id => "jp_substitute_holiday(year, 10, Date.calculate_mday(year, 10, 2, 1))", :name => "振替休日", :regions => [:jp]}],
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 10, Date.calculate_mday(year, 10, 2, 1)) }, :function_id => "jp_substitute_holiday(year, 10, Date.calculate_mday(year, 10, 2, 1))", :name => "振替休日", :regions => [:jp]}]
|
||||||
11 => [{:mday => 3, :name => "文化の日", :regions => [:jp]},
|
}
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 11, 3) }, :function_id => "jp_substitute_holiday(year, 11, 3)", :name => "振替休日", :regions => [:jp]},
|
end
|
||||||
{:mday => 23, :name => "勤労感謝の日", :regions => [:jp]},
|
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 11, 23) }, :function_id => "jp_substitute_holiday(year, 11, 23)", :name => "振替休日", :regions => [:jp]}],
|
|
||||||
12 => [{:mday => 23, :name => "天皇誕生日", :regions => [:jp]},
|
|
||||||
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 12, 23) }, :function_id => "jp_substitute_holiday(year, 12, 23)", :name => "振替休日", :regions => [:jp]}]
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.jp_vernal_equinox_day(year)
|
def self.jp_citizons_holiday(year)
|
||||||
day =
|
year < 2003 and return nil
|
||||||
case year
|
ncd = Holidays.jp_national_culture_day(year)
|
||||||
when 1851..1899
|
if ncd.wday == 3
|
||||||
19.8277
|
ncd - 1
|
||||||
when 1900..1979
|
else
|
||||||
20.8357
|
nil
|
||||||
when 1980..2099
|
end
|
||||||
20.8431
|
|
||||||
when 2100..2150
|
|
||||||
21.8510
|
|
||||||
else
|
|
||||||
raise IndexError.new("Out of range")
|
|
||||||
end
|
|
||||||
day += 0.242194 * (year - 1980) - ((year - 1980)/4).floor
|
|
||||||
day = day.floor
|
|
||||||
Date.civil(year, 3, day)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,24 +81,33 @@ def self.jp_national_culture_day(year)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def self.jp_citizons_holiday(year)
|
|
||||||
year < 2003 and return nil
|
|
||||||
ncd = Holidays.jp_national_culture_day(year)
|
|
||||||
if ncd.wday == 3
|
|
||||||
ncd - 1
|
|
||||||
else
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def self.jp_substitute_holiday(*date)
|
def self.jp_substitute_holiday(*date)
|
||||||
date = date[0].kind_of?(Date) ? date.first : Date.civil(*date)
|
date = date[0].kind_of?(Date) ? date.first : Date.civil(*date)
|
||||||
date.wday == 0 ? date+1 : nil
|
date.wday == 0 ? date+1 : nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def self.jp_vernal_equinox_day(year)
|
||||||
|
day =
|
||||||
|
case year
|
||||||
|
when 1851..1899
|
||||||
|
19.8277
|
||||||
|
when 1900..1979
|
||||||
|
20.8357
|
||||||
|
when 1980..2099
|
||||||
|
20.8431
|
||||||
|
when 2100..2150
|
||||||
|
21.8510
|
||||||
|
else
|
||||||
|
raise IndexError.new("Out of range")
|
||||||
|
end
|
||||||
|
day += 0.242194 * (year - 1980) - ((year - 1980)/4).floor
|
||||||
|
day = day.floor
|
||||||
|
Date.civil(year, 3, day)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::JP::DEFINED_REGIONS, Holidays::JP::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::JP.defined_regions, Holidays::JP.holidays_by_month)
|
||||||
|
|
|
@ -1,52 +1,56 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/mx.yaml, data/north_america_informal.yaml
|
# Definitions loaded: data/mx.yaml, data/north_america_informal.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/mx'
|
# require 'holidays/mx'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module MX # :nodoc:
|
module MX # :nodoc:
|
||||||
DEFINED_REGIONS = [:mx, :mx_pue, :us, :ca]
|
def self.defined_regions
|
||||||
|
[:mx, :mx_pue, :us, :ca]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
1 => [{:mday => 1, :name => "Año nuevo", :regions => [:mx]},
|
{
|
||||||
{:mday => 6, :name => "Dia de los Santos Reyes", :regions => [:mx]}],
|
5 => [{:mday => 1, :name => "Día del Trabajo", :regions => [:mx]},
|
||||||
2 => [{:wday => 1, :week => 1, :name => "Día de la Constitución", :regions => [:mx]},
|
|
||||||
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
|
||||||
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
|
||||||
3 => [{:wday => 1, :week => 3, :name => "Natalicio de Benito Juárez", :regions => [:mx]},
|
|
||||||
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
|
||||||
4 => [{:mday => 30, :type => :informal, :name => "Día del Niño", :regions => [:mx]},
|
|
||||||
{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
|
||||||
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}],
|
|
||||||
5 => [{:mday => 1, :name => "Día del Trabajo", :regions => [:mx]},
|
|
||||||
{:mday => 5, :type => :informal, :name => "Cinco de Mayo", :regions => [:mx]},
|
{:mday => 5, :type => :informal, :name => "Cinco de Mayo", :regions => [:mx]},
|
||||||
{:mday => 5, :name => "La Batalla de Puebla", :regions => [:mx_pue]},
|
{:mday => 5, :name => "La Batalla de Puebla", :regions => [:mx_pue]},
|
||||||
{:mday => 10, :type => :informal, :name => "Día de la Madre", :regions => [:mx]},
|
{:mday => 10, :type => :informal, :name => "Día de la Madre", :regions => [:mx]},
|
||||||
{:mday => 15, :type => :informal, :name => "Día del Maestro", :regions => [:mx]},
|
{:mday => 15, :type => :informal, :name => "Día del Maestro", :regions => [:mx]},
|
||||||
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
||||||
6 => [{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:mx]}],
|
|
||||||
9 => [{:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
|
|
||||||
{:mday => 16, :name => "Día de la Independencia", :regions => [:mx]}],
|
|
||||||
10 => [{:mday => 12, :type => :informal, :name => "Día de la Raza", :regions => [:mx]},
|
|
||||||
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
|
|
||||||
11 => [{:mday => 1, :type => :informal, :name => "Todos los Santos", :regions => [:mx]},
|
11 => [{:mday => 1, :type => :informal, :name => "Todos los Santos", :regions => [:mx]},
|
||||||
{:mday => 2, :type => :informal, :name => "Los Fieles Difuntos", :regions => [:mx]},
|
{:mday => 2, :type => :informal, :name => "Los Fieles Difuntos", :regions => [:mx]},
|
||||||
{:wday => 1, :week => 3, :name => "Día de la Revolución", :regions => [:mx]}],
|
{:wday => 1, :week => 3, :name => "Día de la Revolución", :regions => [:mx]}],
|
||||||
|
6 => [{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:mx]}],
|
||||||
|
1 => [{:mday => 1, :name => "Año nuevo", :regions => [:mx]},
|
||||||
|
{:mday => 6, :name => "Dia de los Santos Reyes", :regions => [:mx]}],
|
||||||
12 => [{:mday => 12, :type => :informal, :name => "Día de la Virgen de Guadalupe", :regions => [:mx]},
|
12 => [{:mday => 12, :type => :informal, :name => "Día de la Virgen de Guadalupe", :regions => [:mx]},
|
||||||
{:mday => 24, :type => :informal, :name => "Nochebuena", :regions => [:mx]},
|
{:mday => 24, :type => :informal, :name => "Nochebuena", :regions => [:mx]},
|
||||||
{:mday => 25, :name => "Navidad", :regions => [:mx]},
|
{:mday => 25, :name => "Navidad", :regions => [:mx]},
|
||||||
{:mday => 28, :name => "Los Santos Inocentes", :regions => [:mx]}]
|
{:mday => 28, :name => "Los Santos Inocentes", :regions => [:mx]}],
|
||||||
}
|
2 => [{:wday => 1, :week => 1, :name => "Día de la Constitución", :regions => [:mx]},
|
||||||
|
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
||||||
|
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
||||||
|
3 => [{:wday => 1, :week => 3, :name => "Natalicio de Benito Juárez", :regions => [:mx]},
|
||||||
|
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
||||||
|
9 => [{:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
|
||||||
|
{:mday => 16, :name => "Día de la Independencia", :regions => [:mx]}],
|
||||||
|
4 => [{:mday => 30, :type => :informal, :name => "Día del Niño", :regions => [:mx]},
|
||||||
|
{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
||||||
|
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}],
|
||||||
|
10 => [{:mday => 12, :type => :informal, :name => "Día de la Raza", :regions => [:mx]},
|
||||||
|
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::MX::DEFINED_REGIONS, Holidays::MX::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::MX.defined_regions, Holidays::MX.holidays_by_month)
|
||||||
|
|
|
@ -1,20 +1,25 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/nl.yaml
|
# Definitions loaded: data/nl.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/nl'
|
# require 'holidays/nl'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module NL # :nodoc:
|
module NL # :nodoc:
|
||||||
DEFINED_REGIONS = [:nl]
|
def self.defined_regions
|
||||||
|
[:nl]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
|
||||||
|
{:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Goede Vrijdag", :regions => [:nl]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Goede Vrijdag", :regions => [:nl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasen", :regions => [:nl]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasen", :regions => [:nl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Pasen", :regions => [:nl]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Pasen", :regions => [:nl]},
|
||||||
|
@ -22,16 +27,15 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinksteren", :regions => [:nl]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinksteren", :regions => [:nl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pinksteren", :regions => [:nl]}],
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pinksteren", :regions => [:nl]}],
|
||||||
1 => [{:mday => 1, :name => "Nieuwjaar", :regions => [:nl]}],
|
1 => [{:mday => 1, :name => "Nieuwjaar", :regions => [:nl]}],
|
||||||
4 => [{:mday => 30, :name => "Koninginnedag", :regions => [:nl]}],
|
|
||||||
5 => [{:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
|
|
||||||
{:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]}],
|
|
||||||
12 => [{:mday => 5, :type => :informal, :name => "Sinterklaas", :regions => [:nl]},
|
12 => [{:mday => 5, :type => :informal, :name => "Sinterklaas", :regions => [:nl]},
|
||||||
{:mday => 25, :name => "Kerstmis", :regions => [:nl]},
|
{:mday => 25, :name => "Kerstmis", :regions => [:nl]},
|
||||||
{:mday => 26, :name => "Kerstmis", :regions => [:nl]}]
|
{:mday => 26, :name => "Kerstmis", :regions => [:nl]}],
|
||||||
}
|
4 => [{:mday => 30, :name => "Koninginnedag", :regions => [:nl]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::NL::DEFINED_REGIONS, Holidays::NL::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::NL.defined_regions, Holidays::NL.holidays_by_month)
|
||||||
|
|
|
@ -1,20 +1,25 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/no.yaml
|
# Definitions loaded: data/no.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/no'
|
# require 'holidays/no'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module NO # :nodoc:
|
module NO # :nodoc:
|
||||||
DEFINED_REGIONS = [:no]
|
def self.defined_regions
|
||||||
|
[:no]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "1. mai", :regions => [:no]},
|
||||||
|
{:mday => 17, :name => "17. mai", :regions => [:no]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:no]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:no]},
|
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skjærtorsdag", :regions => [:no]},
|
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skjærtorsdag", :regions => [:no]},
|
||||||
|
@ -25,16 +30,15 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "1. pinsedag", :regions => [:no]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "1. pinsedag", :regions => [:no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. pinsedag", :regions => [:no]}],
|
{:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. pinsedag", :regions => [:no]}],
|
||||||
1 => [{:mday => 1, :name => "Nyttårsdag", :regions => [:no]}],
|
1 => [{:mday => 1, :name => "Nyttårsdag", :regions => [:no]}],
|
||||||
5 => [{:mday => 1, :name => "1. mai", :regions => [:no]},
|
|
||||||
{:mday => 17, :name => "17. mai", :regions => [:no]}],
|
|
||||||
12 => [{:mday => 24, :type => :informal, :name => "Julaften", :regions => [:no]},
|
12 => [{:mday => 24, :type => :informal, :name => "Julaften", :regions => [:no]},
|
||||||
{:mday => 25, :name => "1. juledag", :regions => [:no]},
|
{:mday => 25, :name => "1. juledag", :regions => [:no]},
|
||||||
{:mday => 26, :name => "2. juledag", :regions => [:no]},
|
{:mday => 26, :name => "2. juledag", :regions => [:no]},
|
||||||
{:mday => 31, :type => :informal, :name => "Nyttårsaften", :regions => [:no]}]
|
{:mday => 31, :type => :informal, :name => "Nyttårsaften", :regions => [:no]}]
|
||||||
}
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::NO::DEFINED_REGIONS, Holidays::NO::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::NO.defined_regions, Holidays::NO.holidays_by_month)
|
||||||
|
|
|
@ -1,40 +1,24 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/ca.yaml, data/mx.yaml, data/us.yaml, data/north_america_informal.yaml
|
# Definitions loaded: data/ca.yaml, data/mx.yaml, data/us.yaml, data/north_america_informal.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/north_america'
|
# require 'holidays/north_america'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module North_America # :nodoc:
|
module North_America # :nodoc:
|
||||||
DEFINED_REGIONS = [:ca, :ca_qc, :ca_ab, :ca_on, :ca_sk, :ca_mb, :ca_nf, :ca_nt, :ca_nu, :ca_bc, :ca_ns, :ca_yk, :mx, :mx_pue, :us, :us_dc]
|
def self.defined_regions
|
||||||
|
[:ca, :ca_qc, :ca_nf, :ca_nt, :ca_nu, :ca_ab, :ca_on, :ca_sk, :ca_mb, :ca_bc, :ca_ns, :ca_yk, :mx, :mx_pue, :us, :us_dc]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:ca]},
|
{
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :type => :informal, :name => "Easter Monday", :regions => [:ca]},
|
5 => [{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "Victoria Day", :regions => [:ca]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :type => :informal, :name => "Good Friday", :regions => [:us]}],
|
|
||||||
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ca]},
|
|
||||||
{:mday => 2, :name => "New Year's", :regions => [:ca_qc]},
|
|
||||||
{:mday => 1, :name => "Año nuevo", :regions => [:mx]},
|
|
||||||
{:mday => 6, :name => "Dia de los Santos Reyes", :regions => [:mx]},
|
|
||||||
{:mday => 1, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "New Year's Day", :regions => [:us]},
|
|
||||||
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:us]},
|
|
||||||
{:function => lambda { |year| Holidays.us_inauguration_day(year) }, :function_id => "us_inauguration_day(year)", :name => "Inauguration Day", :regions => [:us_dc]}],
|
|
||||||
2 => [{:wday => 1, :week => 3, :name => "Family Day", :regions => [:ca_ab, :ca_on, :ca_sk]},
|
|
||||||
{:wday => 1, :week => 3, :name => "Louis Riel Day", :regions => [:ca_mb]},
|
|
||||||
{:wday => 1, :week => 1, :name => "Día de la Constitución", :regions => [:mx]},
|
|
||||||
{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:us]},
|
|
||||||
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
|
||||||
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
|
||||||
3 => [{:mday => 23, :name => "St. George's Day", :regions => [:ca_nf]},
|
|
||||||
{:wday => 1, :week => 3, :name => "Natalicio de Benito Juárez", :regions => [:mx]},
|
|
||||||
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
|
||||||
5 => [{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "Victoria Day", :regions => [:ca]},
|
|
||||||
{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "National Patriotes Day", :regions => [:ca_qc]},
|
{:function => lambda { |year| Holidays.ca_victoria_day(year) }, :function_id => "ca_victoria_day(year)", :name => "National Patriotes Day", :regions => [:ca_qc]},
|
||||||
{:mday => 1, :name => "Día del Trabajo", :regions => [:mx]},
|
{:mday => 1, :name => "Día del Trabajo", :regions => [:mx]},
|
||||||
{:mday => 5, :type => :informal, :name => "Cinco de Mayo", :regions => [:mx]},
|
{:mday => 5, :type => :informal, :name => "Cinco de Mayo", :regions => [:mx]},
|
||||||
|
@ -43,34 +27,26 @@ module Holidays
|
||||||
{:mday => 15, :type => :informal, :name => "Día del Maestro", :regions => [:mx]},
|
{:mday => 15, :type => :informal, :name => "Día del Maestro", :regions => [:mx]},
|
||||||
{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:us]},
|
{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:us]},
|
||||||
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
||||||
6 => [{:mday => 24, :name => "Discovery Day", :regions => [:ca_nf]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:ca]},
|
||||||
{:mday => 24, :name => "Fête Nationale", :regions => [:ca_qc]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :type => :informal, :name => "Easter Monday", :regions => [:ca]},
|
||||||
{:mday => 21, :name => "National Aboriginal Day", :regions => [:ca_nt]},
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :type => :informal, :name => "Good Friday", :regions => [:us]}],
|
||||||
{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:mx]}],
|
|
||||||
7 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Canada Day", :regions => [:ca]},
|
|
||||||
{:mday => 12, :name => "Orangemen's Day", :regions => [:ca_nf]},
|
|
||||||
{:mday => 9, :name => "Nunavut Day", :regions => [:ca_nu]},
|
|
||||||
{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:us]}],
|
|
||||||
8 => [{:wday => 1, :week => 1, :name => "BC Day", :regions => [:ca_bc]},
|
|
||||||
{:wday => 1, :week => 1, :name => "Saskatchewan Day", :regions => [:ca_sk]},
|
|
||||||
{:wday => 1, :week => 1, :name => "Heritage Day", :regions => [:ca_ab]},
|
|
||||||
{:wday => 1, :week => 1, :name => "Natal Day", :regions => [:ca_ns]},
|
|
||||||
{:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_on]},
|
|
||||||
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yk]}],
|
|
||||||
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
|
|
||||||
{:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
|
|
||||||
{:mday => 16, :name => "Día de la Independencia", :regions => [:mx]},
|
|
||||||
{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]}],
|
|
||||||
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca]},
|
|
||||||
{:mday => 12, :type => :informal, :name => "Día de la Raza", :regions => [:mx]},
|
|
||||||
{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:us]},
|
|
||||||
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
|
|
||||||
11 => [{:mday => 11, :name => "Remembrance Day", :regions => [:ca]},
|
11 => [{:mday => 11, :name => "Remembrance Day", :regions => [:ca]},
|
||||||
{:mday => 1, :type => :informal, :name => "Todos los Santos", :regions => [:mx]},
|
{:mday => 1, :type => :informal, :name => "Todos los Santos", :regions => [:mx]},
|
||||||
{:mday => 2, :type => :informal, :name => "Los Fieles Difuntos", :regions => [:mx]},
|
{:mday => 2, :type => :informal, :name => "Los Fieles Difuntos", :regions => [:mx]},
|
||||||
{:wday => 1, :week => 3, :name => "Día de la Revolución", :regions => [:mx]},
|
{:wday => 1, :week => 3, :name => "Día de la Revolución", :regions => [:mx]},
|
||||||
{:mday => 11, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Veterans Day", :regions => [:us]},
|
{:mday => 11, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Veterans Day", :regions => [:us]},
|
||||||
{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:us]}],
|
{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:us]}],
|
||||||
|
6 => [{:mday => 24, :name => "Discovery Day", :regions => [:ca_nf]},
|
||||||
|
{:mday => 24, :name => "Fête Nationale", :regions => [:ca_qc]},
|
||||||
|
{:mday => 21, :name => "National Aboriginal Day", :regions => [:ca_nt]},
|
||||||
|
{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:mx]}],
|
||||||
|
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ca]},
|
||||||
|
{:mday => 2, :name => "New Year's", :regions => [:ca_qc]},
|
||||||
|
{:mday => 1, :name => "Año nuevo", :regions => [:mx]},
|
||||||
|
{:mday => 6, :name => "Dia de los Santos Reyes", :regions => [:mx]},
|
||||||
|
{:mday => 1, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "New Year's Day", :regions => [:us]},
|
||||||
|
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:us]},
|
||||||
|
{:function => lambda { |year| Holidays.us_inauguration_day(year) }, :function_id => "us_inauguration_day(year)", :name => "Inauguration Day", :regions => [:us_dc]}],
|
||||||
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ca]},
|
12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ca]},
|
||||||
{:mday => 26, :name => "Boxing Day", :regions => [:ca]},
|
{:mday => 26, :name => "Boxing Day", :regions => [:ca]},
|
||||||
{:mday => 12, :type => :informal, :name => "Día de la Virgen de Guadalupe", :regions => [:mx]},
|
{:mday => 12, :type => :informal, :name => "Día de la Virgen de Guadalupe", :regions => [:mx]},
|
||||||
|
@ -78,10 +54,38 @@ module Holidays
|
||||||
{:mday => 25, :name => "Navidad", :regions => [:mx]},
|
{:mday => 25, :name => "Navidad", :regions => [:mx]},
|
||||||
{:mday => 28, :name => "Los Santos Inocentes", :regions => [:mx]},
|
{:mday => 28, :name => "Los Santos Inocentes", :regions => [:mx]},
|
||||||
{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:us]}],
|
{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:us]}],
|
||||||
|
7 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Canada Day", :regions => [:ca]},
|
||||||
|
{:mday => 12, :name => "Orangemen's Day", :regions => [:ca_nf]},
|
||||||
|
{:mday => 9, :name => "Nunavut Day", :regions => [:ca_nu]},
|
||||||
|
{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:us]}],
|
||||||
|
2 => [{:wday => 1, :week => 3, :name => "Family Day", :regions => [:ca_ab, :ca_on, :ca_sk]},
|
||||||
|
{:wday => 1, :week => 3, :name => "Louis Riel Day", :regions => [:ca_mb]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Día de la Constitución", :regions => [:mx]},
|
||||||
|
{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:us]},
|
||||||
|
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
||||||
|
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
||||||
|
8 => [{:wday => 1, :week => 1, :name => "BC Day", :regions => [:ca_bc]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Saskatchewan Day", :regions => [:ca_sk]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Heritage Day", :regions => [:ca_ab]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Natal Day", :regions => [:ca_ns]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_on]},
|
||||||
|
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yk]}],
|
||||||
|
3 => [{:mday => 23, :name => "St. George's Day", :regions => [:ca_nf]},
|
||||||
|
{:wday => 1, :week => 3, :name => "Natalicio de Benito Juárez", :regions => [:mx]},
|
||||||
|
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
||||||
|
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
|
||||||
|
{:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
|
||||||
|
{:mday => 16, :name => "Día de la Independencia", :regions => [:mx]},
|
||||||
|
{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]}],
|
||||||
4 => [{:mday => 30, :type => :informal, :name => "Día del Niño", :regions => [:mx]},
|
4 => [{:mday => 30, :type => :informal, :name => "Día del Niño", :regions => [:mx]},
|
||||||
{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
||||||
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}]
|
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}],
|
||||||
}
|
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca]},
|
||||||
|
{:mday => 12, :type => :informal, :name => "Día de la Raza", :regions => [:mx]},
|
||||||
|
{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:us]},
|
||||||
|
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Monday on or before May 24
|
# Monday on or before May 24
|
||||||
|
@ -105,4 +109,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::North_America::DEFINED_REGIONS, Holidays::North_America::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::North_America.defined_regions, Holidays::North_America.holidays_by_month)
|
||||||
|
|
|
@ -1,33 +1,37 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/nyse.yaml
|
# Definitions loaded: data/nyse.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/nyse'
|
# require 'holidays/nyse'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module NYSE # :nodoc:
|
module NYSE # :nodoc:
|
||||||
DEFINED_REGIONS = [:nyse]
|
def self.defined_regions
|
||||||
|
[:nyse]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:nyse]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:nyse]}],
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:nyse]}],
|
||||||
|
11 => [{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:nyse]}],
|
||||||
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:nyse]},
|
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:nyse]},
|
||||||
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:nyse]}],
|
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:nyse]}],
|
||||||
2 => [{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:nyse]}],
|
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:nyse]}],
|
||||||
5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:nyse]}],
|
|
||||||
7 => [{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:nyse]}],
|
7 => [{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:nyse]}],
|
||||||
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:nyse]}],
|
2 => [{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:nyse]}],
|
||||||
11 => [{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:nyse]}],
|
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:nyse]}]
|
||||||
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:nyse]}]
|
}
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::NYSE::DEFINED_REGIONS, Holidays::NYSE::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::NYSE.defined_regions, Holidays::NYSE.holidays_by_month)
|
||||||
|
|
|
@ -1,45 +1,49 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/nz.yaml
|
# Definitions loaded: data/nz.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/nz'
|
# require 'holidays/nz'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module NZ # :nodoc:
|
module NZ # :nodoc:
|
||||||
DEFINED_REGIONS = [:nz, :nz_sl, :nz_we, :nz_ak, :nz_nl, :nz_ot, :nz_sc, :nz_hb, :nz_mb, :nz_ca, :nz_ch, :nz_wl]
|
def self.defined_regions
|
||||||
|
[:nz_ca, :nz_ch, :nz, :nz_wl, :nz_sl, :nz_we, :nz_ak, :nz_nl, :nz_ot, :nz_sc, :nz_hb, :nz_mb]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:nz]},
|
{
|
||||||
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:nz]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Easter Saturday", :regions => [:nz]},
|
{:function => lambda { |year| Holidays.easter(year)-1 }, :function_id => "easter(year)-1", :name => "Easter Saturday", :regions => [:nz]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:nz]}],
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:nz]}],
|
||||||
|
11 => [{:wday => 5, :week => 2, :name => "Canterbury Anniversary Day", :regions => [:nz_ca]},
|
||||||
|
{:mday => 30, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Chatham Island Anniversary Day", :regions => [:nz_ch]}],
|
||||||
|
6 => [{:wday => 1, :week => 1, :name => "Queen's Birthday", :regions => [:nz]}],
|
||||||
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "New Year's Day", :regions => [:nz]},
|
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "New Year's Day", :regions => [:nz]},
|
||||||
{:mday => 2, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Day after New Year's Day", :regions => [:nz]},
|
{:mday => 2, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Day after New Year's Day", :regions => [:nz]},
|
||||||
{:mday => 17, :name => "Southland Anniversary Day", :regions => [:nz_sl]},
|
{:mday => 17, :name => "Southland Anniversary Day", :regions => [:nz_sl]},
|
||||||
{:mday => 22, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Wellington Anniversary Day", :regions => [:nz_we]},
|
{:mday => 22, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Wellington Anniversary Day", :regions => [:nz_we]},
|
||||||
{:mday => 29, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Auckland Anniversary Day", :regions => [:nz_ak]},
|
{:mday => 29, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Auckland Anniversary Day", :regions => [:nz_ak]},
|
||||||
{:mday => 29, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Northland Anniversary Day", :regions => [:nz_nl]}],
|
{:mday => 29, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Northland Anniversary Day", :regions => [:nz_nl]}],
|
||||||
|
12 => [{:mday => 1, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Westland Anniversary Day", :regions => [:nz_wl]},
|
||||||
|
{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:nz]},
|
||||||
|
{:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:nz]}],
|
||||||
2 => [{:mday => 1, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Nelson Anniversary Day", :regions => [:nz_ak]},
|
2 => [{:mday => 1, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Nelson Anniversary Day", :regions => [:nz_ak]},
|
||||||
{:mday => 6, :name => "Waitangi Day", :regions => [:nz]}],
|
{:mday => 6, :name => "Waitangi Day", :regions => [:nz]}],
|
||||||
3 => [{:mday => 23, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Otago Anniversary Day", :regions => [:nz_ot]},
|
3 => [{:mday => 23, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Otago Anniversary Day", :regions => [:nz_ot]},
|
||||||
{:wday => 1, :week => 2, :name => "Taranaki Anniversary Day", :regions => [:nz_ak]}],
|
{:wday => 1, :week => 2, :name => "Taranaki Anniversary Day", :regions => [:nz_ak]}],
|
||||||
4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:nz]}],
|
|
||||||
6 => [{:wday => 1, :week => 1, :name => "Queen's Birthday", :regions => [:nz]}],
|
|
||||||
9 => [{:wday => 1, :week => 4, :name => "Dominion Day", :regions => [:nz_sc]}],
|
9 => [{:wday => 1, :week => 4, :name => "Dominion Day", :regions => [:nz_sc]}],
|
||||||
|
4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:nz]}],
|
||||||
10 => [{:wday => 1, :week => 1, :observed => lambda { |date| Holidays.previous_friday(date) }, :observed_id => "previous_friday", :name => "Hawke's bay Anniversary Day", :regions => [:nz_hb]},
|
10 => [{:wday => 1, :week => 1, :observed => lambda { |date| Holidays.previous_friday(date) }, :observed_id => "previous_friday", :name => "Hawke's bay Anniversary Day", :regions => [:nz_hb]},
|
||||||
{:wday => 1, :week => 4, :name => "Labour Day", :regions => [:nz]},
|
{:wday => 1, :week => 4, :name => "Labour Day", :regions => [:nz]},
|
||||||
{:wday => 1, :week => 4, :observed => lambda { |date| Holidays.next_week(date) }, :observed_id => "next_week", :name => "Marlborough Anniversary Day", :regions => [:nz_mb]}],
|
{:wday => 1, :week => 4, :observed => lambda { |date| Holidays.next_week(date) }, :observed_id => "next_week", :name => "Marlborough Anniversary Day", :regions => [:nz_mb]}]
|
||||||
11 => [{:wday => 5, :week => 2, :name => "Canterbury Anniversary Day", :regions => [:nz_ca]},
|
}
|
||||||
{:mday => 30, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Chatham Island Anniversary Day", :regions => [:nz_ch]}],
|
end
|
||||||
12 => [{:mday => 1, :observed => lambda { |date| Holidays.closest_monday(date) }, :observed_id => "closest_monday", :name => "Westland Anniversary Day", :regions => [:nz_wl]},
|
|
||||||
{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:nz]},
|
|
||||||
{:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:nz]}]
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.closest_monday(date)
|
def self.closest_monday(date)
|
||||||
|
@ -54,16 +58,16 @@ def self.closest_monday(date)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def self.next_week(date)
|
||||||
|
date + 7
|
||||||
|
end
|
||||||
|
|
||||||
def self.previous_friday(date)
|
def self.previous_friday(date)
|
||||||
date - 3
|
date - 3
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def self.next_week(date)
|
|
||||||
date + 7
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::NZ::DEFINED_REGIONS, Holidays::NZ::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::NZ.defined_regions, Holidays::NZ.holidays_by_month)
|
||||||
|
|
|
@ -1,20 +1,26 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/pl.yaml
|
# Definitions loaded: data/pl.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/pl'
|
# require 'holidays/pl'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module PL # :nodoc:
|
module PL # :nodoc:
|
||||||
DEFINED_REGIONS = [:pl]
|
def self.defined_regions
|
||||||
|
[:pl]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Święto Państwowe (Święto Pracy)", :regions => [:pl]},
|
||||||
|
{:mday => 2, :type => :informal, :name => "Dzień Flagi Rzeczpospolitej Polskiej", :regions => [:pl]},
|
||||||
|
{:mday => 3, :name => "Święto Narodowe Trzeciego Maja", :regions => [:pl]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-52 }, :function_id => "easter(year)-52", :type => :informal, :name => "Tłusty Czwartek", :regions => [:pl]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-52 }, :function_id => "easter(year)-52", :type => :informal, :name => "Tłusty Czwartek", :regions => [:pl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Ostatki", :regions => [:pl]},
|
{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Ostatki", :regions => [:pl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-46 }, :function_id => "easter(year)-46", :type => :informal, :name => "Środa Popielcowa", :regions => [:pl]},
|
{:function => lambda { |year| Holidays.easter(year)-46 }, :function_id => "easter(year)-46", :type => :informal, :name => "Środa Popielcowa", :regions => [:pl]},
|
||||||
|
@ -26,36 +32,34 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Poniedziałek Wielkanocny (Lany Poniedziałek)", :regions => [:pl]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Poniedziałek Wielkanocny (Lany Poniedziałek)", :regions => [:pl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Zesłanie Ducha Świętego (Zielone Świątki)", :regions => [:pl]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Zesłanie Ducha Świętego (Zielone Świątki)", :regions => [:pl]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Uroczystość Najświętszego Ciała i Krwi Pańskiej (Boże Ciało)", :regions => [:pl]}],
|
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Uroczystość Najświętszego Ciała i Krwi Pańskiej (Boże Ciało)", :regions => [:pl]}],
|
||||||
|
11 => [{:mday => 1, :name => "Wszystkich Świętych", :regions => [:pl]},
|
||||||
|
{:mday => 2, :type => :informal, :name => "Dzień Zaduszny", :regions => [:pl]},
|
||||||
|
{:mday => 11, :name => "Narodowe Święto Niepodległości", :regions => [:pl]},
|
||||||
|
{:mday => 29, :type => :informal, :name => "Andrzejki", :regions => [:pl]}],
|
||||||
|
6 => [{:mday => 23, :type => :informal, :name => "Dzień Ojca", :regions => [:pl]}],
|
||||||
1 => [{:mday => 1, :name => "Nowy Rok", :regions => [:pl]},
|
1 => [{:mday => 1, :name => "Nowy Rok", :regions => [:pl]},
|
||||||
{:function => lambda { |year| Holidays.pl_trzech_kroli(year) }, :function_id => "pl_trzech_kroli(year)", :name => "Objawienie Pańskie (święto Trzech Króli)", :regions => [:pl]},
|
{:function => lambda { |year| Holidays.pl_trzech_kroli(year) }, :function_id => "pl_trzech_kroli(year)", :name => "Objawienie Pańskie (święto Trzech Króli)", :regions => [:pl]},
|
||||||
{:function => lambda { |year| Holidays.pl_trzech_kroli_informal(year) }, :function_id => "pl_trzech_kroli_informal(year)", :type => :informal, :name => "Objawienie Pańskie (święto Trzech Króli)", :regions => [:pl]},
|
{:function => lambda { |year| Holidays.pl_trzech_kroli_informal(year) }, :function_id => "pl_trzech_kroli_informal(year)", :type => :informal, :name => "Objawienie Pańskie (święto Trzech Króli)", :regions => [:pl]},
|
||||||
{:mday => 21, :type => :informal, :name => "Dzień Babci", :regions => [:pl]},
|
{:mday => 21, :type => :informal, :name => "Dzień Babci", :regions => [:pl]},
|
||||||
{:mday => 22, :type => :informal, :name => "Dzień Dziadka", :regions => [:pl]}],
|
{:mday => 22, :type => :informal, :name => "Dzień Dziadka", :regions => [:pl]}],
|
||||||
2 => [{:mday => 2, :type => :informal, :name => "Ofiarowanie Pańskie (Matki Boskiej Gromnicznej)", :regions => [:pl]},
|
|
||||||
{:mday => 14, :type => :informal, :name => "Dzień Zakochanych (Walentynki)", :regions => [:pl]}],
|
|
||||||
3 => [{:mday => 8, :type => :informal, :name => "Dzień Kobiet", :regions => [:pl]},
|
|
||||||
{:mday => 10, :type => :informal, :name => "Dzień Mężczyzn", :regions => [:pl]}],
|
|
||||||
4 => [{:mday => 1, :type => :informal, :name => "Prima Aprilis", :regions => [:pl]},
|
|
||||||
{:mday => 22, :type => :informal, :name => "Międzynarodowy Dzień Ziemi", :regions => [:pl]}],
|
|
||||||
5 => [{:mday => 1, :name => "Święto Państwowe (Święto Pracy)", :regions => [:pl]},
|
|
||||||
{:mday => 2, :type => :informal, :name => "Dzień Flagi Rzeczpospolitej Polskiej", :regions => [:pl]},
|
|
||||||
{:mday => 3, :name => "Święto Narodowe Trzeciego Maja", :regions => [:pl]}],
|
|
||||||
6 => [{:mday => 23, :type => :informal, :name => "Dzień Ojca", :regions => [:pl]}],
|
|
||||||
8 => [{:mday => 15, :name => "Wniebowzięcie Najświętszej Maryi Panny", :regions => [:pl]},
|
|
||||||
{:mday => 15, :name => "Święto Wojska Polskiego", :regions => [:pl]}],
|
|
||||||
9 => [{:mday => 30, :type => :informal, :name => "Dzień Chłopaka", :regions => [:pl]}],
|
|
||||||
10 => [{:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]}],
|
|
||||||
11 => [{:mday => 1, :name => "Wszystkich Świętych", :regions => [:pl]},
|
|
||||||
{:mday => 2, :type => :informal, :name => "Dzień Zaduszny", :regions => [:pl]},
|
|
||||||
{:mday => 11, :name => "Narodowe Święto Niepodległości", :regions => [:pl]},
|
|
||||||
{:mday => 29, :type => :informal, :name => "Andrzejki", :regions => [:pl]}],
|
|
||||||
12 => [{:mday => 4, :type => :informal, :name => "Barbórka (Dzień Górnika, Naftowca i Gazownika)", :regions => [:pl]},
|
12 => [{:mday => 4, :type => :informal, :name => "Barbórka (Dzień Górnika, Naftowca i Gazownika)", :regions => [:pl]},
|
||||||
{:mday => 6, :type => :informal, :name => "Mikołajki", :regions => [:pl]},
|
{:mday => 6, :type => :informal, :name => "Mikołajki", :regions => [:pl]},
|
||||||
{:mday => 24, :type => :informal, :name => "Wigilia Bożego Narodzenia", :regions => [:pl]},
|
{:mday => 24, :type => :informal, :name => "Wigilia Bożego Narodzenia", :regions => [:pl]},
|
||||||
{:mday => 25, :name => "pierwszy dzień Bożego Narodzenia", :regions => [:pl]},
|
{:mday => 25, :name => "pierwszy dzień Bożego Narodzenia", :regions => [:pl]},
|
||||||
{:mday => 26, :name => "drugi dzień Bożego Narodzenia", :regions => [:pl]},
|
{:mday => 26, :name => "drugi dzień Bożego Narodzenia", :regions => [:pl]},
|
||||||
{:mday => 31, :type => :informal, :name => "Sylwester", :regions => [:pl]}]
|
{:mday => 31, :type => :informal, :name => "Sylwester", :regions => [:pl]}],
|
||||||
}
|
2 => [{:mday => 2, :type => :informal, :name => "Ofiarowanie Pańskie (Matki Boskiej Gromnicznej)", :regions => [:pl]},
|
||||||
|
{:mday => 14, :type => :informal, :name => "Dzień Zakochanych (Walentynki)", :regions => [:pl]}],
|
||||||
|
8 => [{:mday => 15, :name => "Wniebowzięcie Najświętszej Maryi Panny", :regions => [:pl]},
|
||||||
|
{:mday => 15, :name => "Święto Wojska Polskiego", :regions => [:pl]}],
|
||||||
|
3 => [{:mday => 8, :type => :informal, :name => "Dzień Kobiet", :regions => [:pl]},
|
||||||
|
{:mday => 10, :type => :informal, :name => "Dzień Mężczyzn", :regions => [:pl]}],
|
||||||
|
9 => [{:mday => 30, :type => :informal, :name => "Dzień Chłopaka", :regions => [:pl]}],
|
||||||
|
4 => [{:mday => 1, :type => :informal, :name => "Prima Aprilis", :regions => [:pl]},
|
||||||
|
{:mday => 22, :type => :informal, :name => "Międzynarodowy Dzień Ziemi", :regions => [:pl]}],
|
||||||
|
10 => [{:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Poland: January 6 is holiday since 2011
|
# Poland: January 6 is holiday since 2011
|
||||||
|
@ -73,4 +77,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::PL::DEFINED_REGIONS, Holidays::PL::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::PL.defined_regions, Holidays::PL.holidays_by_month)
|
||||||
|
|
|
@ -1,38 +1,42 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/pt.yaml
|
# Definitions loaded: data/pt.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/pt'
|
# require 'holidays/pt'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module PT # :nodoc:
|
module PT # :nodoc:
|
||||||
DEFINED_REGIONS = [:pt]
|
def self.defined_regions
|
||||||
|
[:pt]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:pt]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:pt]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpo de Deus", :regions => [:pt]}],
|
{:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpo de Deus", :regions => [:pt]}],
|
||||||
1 => [{:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
|
|
||||||
4 => [{:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]}],
|
|
||||||
5 => [{:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
|
|
||||||
6 => [{:mday => 10, :name => "Dia de Portugal", :regions => [:pt]}],
|
|
||||||
8 => [{:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]}],
|
|
||||||
10 => [{:mday => 5, :name => "Implantação da República", :regions => [:pt]}],
|
|
||||||
11 => [{:mday => 1, :name => "Todos os Santos", :regions => [:pt]}],
|
11 => [{:mday => 1, :name => "Todos os Santos", :regions => [:pt]}],
|
||||||
|
6 => [{:mday => 10, :name => "Dia de Portugal", :regions => [:pt]}],
|
||||||
|
1 => [{:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
|
||||||
12 => [{:mday => 1, :name => "Restauração da Independência", :regions => [:pt]},
|
12 => [{:mday => 1, :name => "Restauração da Independência", :regions => [:pt]},
|
||||||
{:mday => 8, :name => "Imaculada Conceição", :regions => [:pt]},
|
{:mday => 8, :name => "Imaculada Conceição", :regions => [:pt]},
|
||||||
{:mday => 25, :name => "Natal", :regions => [:pt]}]
|
{:mday => 25, :name => "Natal", :regions => [:pt]}],
|
||||||
}
|
8 => [{:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]}],
|
||||||
|
4 => [{:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]}],
|
||||||
|
10 => [{:mday => 5, :name => "Implantação da República", :regions => [:pt]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::PT::DEFINED_REGIONS, Holidays::PT::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::PT.defined_regions, Holidays::PT.holidays_by_month)
|
||||||
|
|
|
@ -1,20 +1,31 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/dk.yaml, data/is.yaml, data/no.yaml, data/se.yaml, data/fi.yaml
|
# Definitions loaded: data/dk.yaml, data/is.yaml, data/no.yaml, data/se.yaml, data/fi.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/scandinavia'
|
# require 'holidays/scandinavia'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module Scandinavia # :nodoc:
|
module Scandinavia # :nodoc:
|
||||||
DEFINED_REGIONS = [:dk, :no, :is, :se, :fi]
|
def self.defined_regions
|
||||||
|
[:dk, :no, :is, :se, :fi]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
|
||||||
|
{:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]},
|
||||||
|
{:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
|
||||||
|
{:mday => 13, :name => "Mæðradagurinn", :regions => [:is]},
|
||||||
|
{:mday => 1, :name => "1. mai", :regions => [:no]},
|
||||||
|
{:mday => 17, :name => "17. mai", :regions => [:no]},
|
||||||
|
{:mday => 1, :name => "Första maj", :regions => [:se]},
|
||||||
|
{:mday => 1, :name => "Vappu", :regions => [:fi]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk, :no]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk, :no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk, :no]},
|
{:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk, :no]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
|
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
|
||||||
|
@ -52,6 +63,16 @@ module Holidays
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Helatorstai", :regions => [:fi]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Helatorstai", :regions => [:fi]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Helluntaipäivä", :regions => [:fi]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Helluntaipäivä", :regions => [:fi]},
|
||||||
{:function => lambda { |year| Holidays.fi_pyhainpaiva(year) }, :function_id => "fi_pyhainpaiva(year)", :name => "Pyhäinpäivä", :regions => [:fi]}],
|
{:function => lambda { |year| Holidays.fi_pyhainpaiva(year) }, :function_id => "fi_pyhainpaiva(year)", :name => "Pyhäinpäivä", :regions => [:fi]}],
|
||||||
|
11 => [{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
|
||||||
|
{:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]}],
|
||||||
|
6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
|
||||||
|
{:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
|
||||||
|
{:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
|
||||||
|
{:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
|
||||||
|
{:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
|
||||||
|
{:mday => 6, :name => "Nationaldagen", :regions => [:se]},
|
||||||
|
{:function => lambda { |year| Holidays.se_midsommardagen(year) }, :function_id => "se_midsommardagen(year)", :name => "Midsommardagen", :regions => [:se]},
|
||||||
|
{:function => lambda { |year| Holidays.fi_juhannuspaiva(year) }, :function_id => "fi_juhannuspaiva(year)", :name => "Juhannuspäivä", :regions => [:fi]}],
|
||||||
1 => [{:mday => 1, :name => "Nytårsdag", :regions => [:dk]},
|
1 => [{:mday => 1, :name => "Nytårsdag", :regions => [:dk]},
|
||||||
{:mday => 1, :name => "Nýársdagur", :regions => [:is]},
|
{:mday => 1, :name => "Nýársdagur", :regions => [:is]},
|
||||||
{:mday => 6, :name => "Þrettándinn", :regions => [:is]},
|
{:mday => 6, :name => "Þrettándinn", :regions => [:is]},
|
||||||
|
@ -61,28 +82,6 @@ module Holidays
|
||||||
{:mday => 6, :name => "Trettondedag jul", :regions => [:se]},
|
{:mday => 6, :name => "Trettondedag jul", :regions => [:se]},
|
||||||
{:mday => 1, :name => "Uudenvuodenpäivä", :regions => [:fi]},
|
{:mday => 1, :name => "Uudenvuodenpäivä", :regions => [:fi]},
|
||||||
{:mday => 6, :name => "Loppiainen", :regions => [:fi]}],
|
{:mday => 6, :name => "Loppiainen", :regions => [:fi]}],
|
||||||
4 => [{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
|
|
||||||
{:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
|
|
||||||
{:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]},
|
|
||||||
{:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]}],
|
|
||||||
5 => [{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
|
|
||||||
{:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]},
|
|
||||||
{:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
|
|
||||||
{:mday => 13, :name => "Mæðradagurinn", :regions => [:is]},
|
|
||||||
{:mday => 1, :name => "1. mai", :regions => [:no]},
|
|
||||||
{:mday => 17, :name => "17. mai", :regions => [:no]},
|
|
||||||
{:mday => 1, :name => "Första maj", :regions => [:se]},
|
|
||||||
{:mday => 1, :name => "Vappu", :regions => [:fi]}],
|
|
||||||
6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
|
|
||||||
{:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
|
|
||||||
{:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
|
|
||||||
{:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
|
|
||||||
{:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
|
|
||||||
{:mday => 6, :name => "Nationaldagen", :regions => [:se]},
|
|
||||||
{:function => lambda { |year| Holidays.se_midsommardagen(year) }, :function_id => "se_midsommardagen(year)", :name => "Midsommardagen", :regions => [:se]},
|
|
||||||
{:function => lambda { |year| Holidays.fi_juhannuspaiva(year) }, :function_id => "fi_juhannuspaiva(year)", :name => "Juhannuspäivä", :regions => [:fi]}],
|
|
||||||
11 => [{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
|
|
||||||
{:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]}],
|
|
||||||
12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
|
12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
|
||||||
{:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
|
{:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
|
||||||
{:mday => 25, :name => "1. juledag", :regions => [:dk, :no]},
|
{:mday => 25, :name => "1. juledag", :regions => [:dk, :no]},
|
||||||
|
@ -100,10 +99,31 @@ module Holidays
|
||||||
{:mday => 25, :name => "Joulupäivä", :regions => [:fi]},
|
{:mday => 25, :name => "Joulupäivä", :regions => [:fi]},
|
||||||
{:mday => 26, :name => "Tapaninpäivä", :regions => [:fi]}],
|
{:mday => 26, :name => "Tapaninpäivä", :regions => [:fi]}],
|
||||||
2 => [{:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]}],
|
2 => [{:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]}],
|
||||||
8 => [{:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]}]
|
8 => [{:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]}],
|
||||||
}
|
4 => [{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
|
||||||
|
{:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
|
||||||
|
{:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]},
|
||||||
|
{:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Sweden: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
||||||
|
def self.se_alla_helgons_dag(year)
|
||||||
|
date = Date.civil(year,10,31)
|
||||||
|
date += (6 - date.wday)
|
||||||
|
date
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Finland: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
||||||
|
def self.fi_pyhainpaiva(year)
|
||||||
|
date = Date.civil(year,10,31)
|
||||||
|
date += (6 - date.wday)
|
||||||
|
date
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# Iceland: first day of summer (Thursday after 18 April)
|
# Iceland: first day of summer (Thursday after 18 April)
|
||||||
def self.is_sumardagurinn_fyrsti(year)
|
def self.is_sumardagurinn_fyrsti(year)
|
||||||
date = Date.civil(year,4,18)
|
date = Date.civil(year,4,18)
|
||||||
|
@ -124,14 +144,6 @@ def self.se_midsommardagen(year)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Sweden: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
|
||||||
def self.se_alla_helgons_dag(year)
|
|
||||||
date = Date.civil(year,10,31)
|
|
||||||
date += (6 - date.wday)
|
|
||||||
date
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
# Finland: Mid-summer (Saturday between June 20–26)
|
# Finland: Mid-summer (Saturday between June 20–26)
|
||||||
def self.fi_juhannuspaiva(year)
|
def self.fi_juhannuspaiva(year)
|
||||||
date = Date.civil(year,6,20)
|
date = Date.civil(year,6,20)
|
||||||
|
@ -140,15 +152,7 @@ def self.fi_juhannuspaiva(year)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Finland: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
|
||||||
def self.fi_pyhainpaiva(year)
|
|
||||||
date = Date.civil(year,10,31)
|
|
||||||
date += (6 - date.wday)
|
|
||||||
date
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::Scandinavia::DEFINED_REGIONS, Holidays::Scandinavia::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::Scandinavia.defined_regions, Holidays::Scandinavia.holidays_by_month)
|
||||||
|
|
|
@ -1,44 +1,40 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/se.yaml
|
# Definitions loaded: data/se.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/se'
|
# require 'holidays/se'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module SE # :nodoc:
|
module SE # :nodoc:
|
||||||
DEFINED_REGIONS = [:se]
|
def self.defined_regions
|
||||||
|
[:se]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :name => "Första maj", :regions => [:se]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Långfredagen", :regions => [:se]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Långfredagen", :regions => [:se]},
|
||||||
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskdagen", :regions => [:se]},
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskdagen", :regions => [:se]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Annandag påsk", :regions => [:se]},
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Annandag påsk", :regions => [:se]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi himmelsfärdsdag", :regions => [:se]},
|
{:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi himmelsfärdsdag", :regions => [:se]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pingstdagen", :regions => [:se]},
|
{:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pingstdagen", :regions => [:se]},
|
||||||
{:function => lambda { |year| Holidays.se_alla_helgons_dag(year) }, :function_id => "se_alla_helgons_dag(year)", :name => "Alla helgons dag", :regions => [:se]}],
|
{:function => lambda { |year| Holidays.se_alla_helgons_dag(year) }, :function_id => "se_alla_helgons_dag(year)", :name => "Alla helgons dag", :regions => [:se]}],
|
||||||
1 => [{:mday => 1, :name => "Nyårsdagen", :regions => [:se]},
|
|
||||||
{:mday => 6, :name => "Trettondedag jul", :regions => [:se]}],
|
|
||||||
5 => [{:mday => 1, :name => "Första maj", :regions => [:se]}],
|
|
||||||
6 => [{:mday => 6, :name => "Nationaldagen", :regions => [:se]},
|
6 => [{:mday => 6, :name => "Nationaldagen", :regions => [:se]},
|
||||||
{:function => lambda { |year| Holidays.se_midsommardagen(year) }, :function_id => "se_midsommardagen(year)", :name => "Midsommardagen", :regions => [:se]}],
|
{:function => lambda { |year| Holidays.se_midsommardagen(year) }, :function_id => "se_midsommardagen(year)", :name => "Midsommardagen", :regions => [:se]}],
|
||||||
|
1 => [{:mday => 1, :name => "Nyårsdagen", :regions => [:se]},
|
||||||
|
{:mday => 6, :name => "Trettondedag jul", :regions => [:se]}],
|
||||||
12 => [{:mday => 25, :name => "Juldagen", :regions => [:se]},
|
12 => [{:mday => 25, :name => "Juldagen", :regions => [:se]},
|
||||||
{:mday => 26, :name => "Annandag jul", :regions => [:se]}]
|
{:mday => 26, :name => "Annandag jul", :regions => [:se]}]
|
||||||
}
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sweden: Mid-summer (Saturday between June 20–26)
|
|
||||||
def self.se_midsommardagen(year)
|
|
||||||
date = Date.civil(year,6,20)
|
|
||||||
date += (6 - date.wday)
|
|
||||||
date
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
# Sweden: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
# Sweden: All Saint's Day (Saturday between Oct 31 and Nov 6)
|
||||||
def self.se_alla_helgons_dag(year)
|
def self.se_alla_helgons_dag(year)
|
||||||
date = Date.civil(year,10,31)
|
date = Date.civil(year,10,31)
|
||||||
|
@ -47,7 +43,15 @@ def self.se_alla_helgons_dag(year)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Sweden: Mid-summer (Saturday between June 20–26)
|
||||||
|
def self.se_midsommardagen(year)
|
||||||
|
date = Date.civil(year,6,20)
|
||||||
|
date += (6 - date.wday)
|
||||||
|
date
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::SE::DEFINED_REGIONS, Holidays::SE::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::SE.defined_regions, Holidays::SE.holidays_by_month)
|
||||||
|
|
|
@ -1,29 +1,24 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/united_nations.yaml
|
# Definitions loaded: data/united_nations.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/united_nations'
|
# require 'holidays/united_nations'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module United_Nations # :nodoc:
|
module United_Nations # :nodoc:
|
||||||
DEFINED_REGIONS = [:united_nations]
|
def self.defined_regions
|
||||||
|
[:united_nations]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
2 => [{:mday => 2, :name => "International Mother Language Day", :regions => [:united_nations]}],
|
{
|
||||||
3 => [{:mday => 8, :name => "United Nations Day for Women's Rights and International Peace", :regions => [:united_nations]},
|
5 => [{:mday => 3, :name => "World Press Freedom Day", :regions => [:united_nations]},
|
||||||
{:mday => 21, :name => "International Day for the Elimination of Racial Discrimination", :regions => [:united_nations]},
|
|
||||||
{:mday => 21, :name => "Beginning of the Week of Solidarity with the Peoples Struggling against Racism and Racial Discrimination", :regions => [:united_nations]},
|
|
||||||
{:mday => 22, :name => "World Day for Water", :regions => [:united_nations]},
|
|
||||||
{:mday => 23, :name => "World Meteorological Day", :regions => [:united_nations]}],
|
|
||||||
4 => [{:mday => 7, :name => "World Health Day", :regions => [:united_nations]},
|
|
||||||
{:mday => 23, :name => "World Book and Copyright Day", :regions => [:united_nations]}],
|
|
||||||
5 => [{:mday => 3, :name => "World Press Freedom Day", :regions => [:united_nations]},
|
|
||||||
{:mday => 15, :name => "International Day of Families", :regions => [:united_nations]},
|
{:mday => 15, :name => "International Day of Families", :regions => [:united_nations]},
|
||||||
{:mday => 17, :name => "World Telecommunication Day", :regions => [:united_nations]},
|
{:mday => 17, :name => "World Telecommunication Day", :regions => [:united_nations]},
|
||||||
{:mday => 21, :name => "World Day for Cultural Diversity for Dialogue and Development", :regions => [:united_nations]},
|
{:mday => 21, :name => "World Day for Cultural Diversity for Dialogue and Development", :regions => [:united_nations]},
|
||||||
|
@ -31,6 +26,13 @@ module Holidays
|
||||||
{:mday => 25, :name => "Beginning of the Week of Solidarity with the Peoples of Non-Self-Governing Territories", :regions => [:united_nations]},
|
{:mday => 25, :name => "Beginning of the Week of Solidarity with the Peoples of Non-Self-Governing Territories", :regions => [:united_nations]},
|
||||||
{:mday => 29, :name => "International Day of United Nations Peacekeepers", :regions => [:united_nations]},
|
{:mday => 29, :name => "International Day of United Nations Peacekeepers", :regions => [:united_nations]},
|
||||||
{:mday => 31, :name => "World No-Tobacco Day", :regions => [:united_nations]}],
|
{:mday => 31, :name => "World No-Tobacco Day", :regions => [:united_nations]}],
|
||||||
|
11 => [{:mday => 6, :name => "International Day for Preventing the Exploitation of the Environment in War and Armed Conflict", :regions => [:united_nations]},
|
||||||
|
{:mday => 16, :name => "International Day for Tolerance", :regions => [:united_nations]},
|
||||||
|
{:mday => 20, :name => "Africa Industrialization Day", :regions => [:united_nations]},
|
||||||
|
{:mday => 20, :name => "Universal Children's Day", :regions => [:united_nations]},
|
||||||
|
{:mday => 21, :name => "World Television Day", :regions => [:united_nations]},
|
||||||
|
{:mday => 25, :name => "International Day for the Elimination of Violence against Women", :regions => [:united_nations]},
|
||||||
|
{:mday => 29, :name => "International Day of Solidarity with the Palestinian People", :regions => [:united_nations]}],
|
||||||
6 => [{:mday => 4, :name => "International Day of Innocent Children Victims of Aggression", :regions => [:united_nations]},
|
6 => [{:mday => 4, :name => "International Day of Innocent Children Victims of Aggression", :regions => [:united_nations]},
|
||||||
{:mday => 5, :name => "World Environment Day", :regions => [:united_nations]},
|
{:mday => 5, :name => "World Environment Day", :regions => [:united_nations]},
|
||||||
{:mday => 17, :name => "World Day to Combat Desertification and Drought", :regions => [:united_nations]},
|
{:mday => 17, :name => "World Day to Combat Desertification and Drought", :regions => [:united_nations]},
|
||||||
|
@ -38,15 +40,30 @@ module Holidays
|
||||||
{:mday => 23, :name => "United Nations Public Service Day", :regions => [:united_nations]},
|
{:mday => 23, :name => "United Nations Public Service Day", :regions => [:united_nations]},
|
||||||
{:mday => 26, :name => "International Day against Drug Abuse and Illicit Trafficking", :regions => [:united_nations]},
|
{:mday => 26, :name => "International Day against Drug Abuse and Illicit Trafficking", :regions => [:united_nations]},
|
||||||
{:mday => 26, :name => "International Day in Support of Victims of Torture", :regions => [:united_nations]}],
|
{:mday => 26, :name => "International Day in Support of Victims of Torture", :regions => [:united_nations]}],
|
||||||
|
12 => [{:mday => 1, :name => "World AIDS Day", :regions => [:united_nations]},
|
||||||
|
{:mday => 2, :name => "International Day for the Abolition of Slavery", :regions => [:united_nations]},
|
||||||
|
{:mday => 3, :name => "International Day of Disabled Persons", :regions => [:united_nations]},
|
||||||
|
{:mday => 5, :name => "International Volunteer Day for Economic and Social Development", :regions => [:united_nations]},
|
||||||
|
{:mday => 7, :name => "International Civil Aviation Day", :regions => [:united_nations]},
|
||||||
|
{:mday => 10, :name => "Human Rights Day", :regions => [:united_nations]},
|
||||||
|
{:mday => 18, :name => "International Migrants Day", :regions => [:united_nations]}],
|
||||||
7 => [{:wday => 6, :week => 1, :name => "International Day of Cooperatives", :regions => [:united_nations]},
|
7 => [{:wday => 6, :week => 1, :name => "International Day of Cooperatives", :regions => [:united_nations]},
|
||||||
{:mday => 11, :name => "World Population Day", :regions => [:united_nations]}],
|
{:mday => 11, :name => "World Population Day", :regions => [:united_nations]}],
|
||||||
|
2 => [{:mday => 2, :name => "International Mother Language Day", :regions => [:united_nations]}],
|
||||||
8 => [{:mday => 9, :name => "International Day of the World's Indigenous People", :regions => [:united_nations]},
|
8 => [{:mday => 9, :name => "International Day of the World's Indigenous People", :regions => [:united_nations]},
|
||||||
{:mday => 12, :name => "International Youth Day", :regions => [:united_nations]},
|
{:mday => 12, :name => "International Youth Day", :regions => [:united_nations]},
|
||||||
{:mday => 23, :name => "International Day for the Remembrance of the Slave Trade and Its Abolition", :regions => [:united_nations]}],
|
{:mday => 23, :name => "International Day for the Remembrance of the Slave Trade and Its Abolition", :regions => [:united_nations]}],
|
||||||
|
3 => [{:mday => 8, :name => "United Nations Day for Women's Rights and International Peace", :regions => [:united_nations]},
|
||||||
|
{:mday => 21, :name => "International Day for the Elimination of Racial Discrimination", :regions => [:united_nations]},
|
||||||
|
{:mday => 21, :name => "Beginning of the Week of Solidarity with the Peoples Struggling against Racism and Racial Discrimination", :regions => [:united_nations]},
|
||||||
|
{:mday => 22, :name => "World Day for Water", :regions => [:united_nations]},
|
||||||
|
{:mday => 23, :name => "World Meteorological Day", :regions => [:united_nations]}],
|
||||||
9 => [{:mday => 8, :name => "International Literacy Day", :regions => [:united_nations]},
|
9 => [{:mday => 8, :name => "International Literacy Day", :regions => [:united_nations]},
|
||||||
{:mday => 16, :name => "International Day for the Preservation of the Ozone Layer", :regions => [:united_nations]},
|
{:mday => 16, :name => "International Day for the Preservation of the Ozone Layer", :regions => [:united_nations]},
|
||||||
{:mday => 21, :name => "International Day of Peace", :regions => [:united_nations]},
|
{:mday => 21, :name => "International Day of Peace", :regions => [:united_nations]},
|
||||||
{:mday => 1, :name => "International Day of Older Persons", :regions => [:united_nations]}],
|
{:mday => 1, :name => "International Day of Older Persons", :regions => [:united_nations]}],
|
||||||
|
4 => [{:mday => 7, :name => "World Health Day", :regions => [:united_nations]},
|
||||||
|
{:mday => 23, :name => "World Book and Copyright Day", :regions => [:united_nations]}],
|
||||||
10 => [{:mday => 4, :name => "World Space Week", :regions => [:united_nations]},
|
10 => [{:mday => 4, :name => "World Space Week", :regions => [:united_nations]},
|
||||||
{:mday => 5, :name => "World Teachers' Day", :regions => [:united_nations]},
|
{:mday => 5, :name => "World Teachers' Day", :regions => [:united_nations]},
|
||||||
{:wday => 1, :week => 1, :name => "World Habitat Day", :regions => [:united_nations]},
|
{:wday => 1, :week => 1, :name => "World Habitat Day", :regions => [:united_nations]},
|
||||||
|
@ -57,25 +74,12 @@ module Holidays
|
||||||
{:mday => 17, :name => "International Day for the Eradication of Poverty", :regions => [:united_nations]},
|
{:mday => 17, :name => "International Day for the Eradication of Poverty", :regions => [:united_nations]},
|
||||||
{:mday => 24, :name => "United Nations Day", :regions => [:united_nations]},
|
{:mday => 24, :name => "United Nations Day", :regions => [:united_nations]},
|
||||||
{:mday => 24, :name => "World Development Information Day", :regions => [:united_nations]},
|
{:mday => 24, :name => "World Development Information Day", :regions => [:united_nations]},
|
||||||
{:mday => 24, :name => "Disarmament Week", :regions => [:united_nations]}],
|
{:mday => 24, :name => "Disarmament Week", :regions => [:united_nations]}]
|
||||||
11 => [{:mday => 6, :name => "International Day for Preventing the Exploitation of the Environment in War and Armed Conflict", :regions => [:united_nations]},
|
}
|
||||||
{:mday => 16, :name => "International Day for Tolerance", :regions => [:united_nations]},
|
end
|
||||||
{:mday => 20, :name => "Africa Industrialization Day", :regions => [:united_nations]},
|
|
||||||
{:mday => 20, :name => "Universal Children's Day", :regions => [:united_nations]},
|
|
||||||
{:mday => 21, :name => "World Television Day", :regions => [:united_nations]},
|
|
||||||
{:mday => 25, :name => "International Day for the Elimination of Violence against Women", :regions => [:united_nations]},
|
|
||||||
{:mday => 29, :name => "International Day of Solidarity with the Palestinian People", :regions => [:united_nations]}],
|
|
||||||
12 => [{:mday => 1, :name => "World AIDS Day", :regions => [:united_nations]},
|
|
||||||
{:mday => 2, :name => "International Day for the Abolition of Slavery", :regions => [:united_nations]},
|
|
||||||
{:mday => 3, :name => "International Day of Disabled Persons", :regions => [:united_nations]},
|
|
||||||
{:mday => 5, :name => "International Volunteer Day for Economic and Social Development", :regions => [:united_nations]},
|
|
||||||
{:mday => 7, :name => "International Civil Aviation Day", :regions => [:united_nations]},
|
|
||||||
{:mday => 10, :name => "Human Rights Day", :regions => [:united_nations]},
|
|
||||||
{:mday => 18, :name => "International Migrants Day", :regions => [:united_nations]}]
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::United_Nations::DEFINED_REGIONS, Holidays::United_Nations::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::United_Nations.defined_regions, Holidays::United_Nations.holidays_by_month)
|
||||||
|
|
|
@ -1,32 +1,36 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/ups.yaml
|
# Definitions loaded: data/ups.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/ups'
|
# require 'holidays/ups'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module UPS # :nodoc:
|
module UPS # :nodoc:
|
||||||
DEFINED_REGIONS = [:ups]
|
def self.defined_regions
|
||||||
|
[:ups]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "New Year's Day", :regions => [:ups]}],
|
{
|
||||||
5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:ups]}],
|
5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:ups]}],
|
||||||
7 => [{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:ups]}],
|
|
||||||
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:ups]}],
|
|
||||||
11 => [{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:ups]},
|
11 => [{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:ups]},
|
||||||
{:wday => 5, :week => 4, :name => "Day After Thanksgiving", :regions => [:ups]}],
|
{:wday => 5, :week => 4, :name => "Day After Thanksgiving", :regions => [:ups]}],
|
||||||
|
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "New Year's Day", :regions => [:ups]}],
|
||||||
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:ups]},
|
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:ups]},
|
||||||
{:mday => 31, :name => "New Year's Eve", :regions => [:ups]}]
|
{:mday => 31, :name => "New Year's Eve", :regions => [:ups]}],
|
||||||
}
|
7 => [{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:ups]}],
|
||||||
|
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:ups]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::UPS::DEFINED_REGIONS, Holidays::UPS::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::UPS.defined_regions, Holidays::UPS.holidays_by_month)
|
||||||
|
|
|
@ -1,40 +1,44 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/us.yaml, data/north_america_informal.yaml
|
# Definitions loaded: data/us.yaml, data/north_america_informal.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/us'
|
# require 'holidays/us'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module US # :nodoc:
|
module US # :nodoc:
|
||||||
DEFINED_REGIONS = [:us, :us_dc, :ca]
|
def self.defined_regions
|
||||||
|
[:us, :us_dc, :ca]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:us]},
|
||||||
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :type => :informal, :name => "Good Friday", :regions => [:us]}],
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :type => :informal, :name => "Good Friday", :regions => [:us]}],
|
||||||
|
11 => [{:mday => 11, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Veterans Day", :regions => [:us]},
|
||||||
|
{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:us]}],
|
||||||
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "New Year's Day", :regions => [:us]},
|
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "New Year's Day", :regions => [:us]},
|
||||||
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:us]},
|
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:us]},
|
||||||
{:function => lambda { |year| Holidays.us_inauguration_day(year) }, :function_id => "us_inauguration_day(year)", :name => "Inauguration Day", :regions => [:us_dc]}],
|
{:function => lambda { |year| Holidays.us_inauguration_day(year) }, :function_id => "us_inauguration_day(year)", :name => "Inauguration Day", :regions => [:us_dc]}],
|
||||||
|
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:us]}],
|
||||||
|
7 => [{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:us]}],
|
||||||
2 => [{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:us]},
|
2 => [{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:us]},
|
||||||
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
||||||
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
||||||
5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:us]},
|
|
||||||
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
|
||||||
7 => [{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:us]}],
|
|
||||||
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]}],
|
|
||||||
10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:us]},
|
|
||||||
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
|
|
||||||
11 => [{:mday => 11, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Veterans Day", :regions => [:us]},
|
|
||||||
{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:us]}],
|
|
||||||
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:us]}],
|
|
||||||
3 => [{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
3 => [{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
||||||
|
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]}],
|
||||||
4 => [{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
4 => [{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
||||||
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}]
|
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}],
|
||||||
}
|
10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:us]},
|
||||||
|
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# January 20, every fourth year, following Presidential election
|
# January 20, every fourth year, following Presidential election
|
||||||
|
@ -46,4 +50,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::US::DEFINED_REGIONS, Holidays::US::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::US.defined_regions, Holidays::US.holidays_by_month)
|
||||||
|
|
|
@ -1,36 +1,40 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Holidays
|
module Holidays
|
||||||
# This file is generated by the Ruby Holiday gem.
|
# This file is generated by the Ruby Holidays gem.
|
||||||
#
|
#
|
||||||
# Definitions loaded: data/za.yaml
|
# Definitions loaded: data/za.yaml
|
||||||
#
|
#
|
||||||
# To use the definitions in this file, load them right after you load the
|
# To use the definitions in this file, load it right after you load the
|
||||||
# Holiday gem:
|
# Holiday gem:
|
||||||
#
|
#
|
||||||
# require 'holidays'
|
# require 'holidays'
|
||||||
# require 'holidays/za'
|
# require 'holidays/za'
|
||||||
#
|
#
|
||||||
# More definitions are available at http://code.dunae.ca/holidays.
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
||||||
module ZA # :nodoc:
|
module ZA # :nodoc:
|
||||||
DEFINED_REGIONS = [:za]
|
def self.defined_regions
|
||||||
|
[:za]
|
||||||
|
end
|
||||||
|
|
||||||
HOLIDAYS_BY_MONTH = {
|
def self.holidays_by_month
|
||||||
|
{
|
||||||
|
5 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Workers Day", :regions => [:za]}],
|
||||||
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:za]},
|
0 => [{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:za]},
|
||||||
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Family Day", :regions => [:za]}],
|
{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Family Day", :regions => [:za]}],
|
||||||
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "New Year's Day", :regions => [:za]}],
|
|
||||||
3 => [{:mday => 21, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Human Rights Day", :regions => [:za]}],
|
|
||||||
4 => [{:mday => 27, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Freedom Day", :regions => [:za]}],
|
|
||||||
5 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Workers Day", :regions => [:za]}],
|
|
||||||
6 => [{:mday => 16, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Youth Day", :regions => [:za]}],
|
6 => [{:mday => 16, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Youth Day", :regions => [:za]}],
|
||||||
8 => [{:mday => 9, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "National Women's Day", :regions => [:za]}],
|
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "New Year's Day", :regions => [:za]}],
|
||||||
9 => [{:mday => 24, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Heritage Day", :regions => [:za]}],
|
|
||||||
12 => [{:mday => 16, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Day of Reconciliation", :regions => [:za]},
|
12 => [{:mday => 16, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Day of Reconciliation", :regions => [:za]},
|
||||||
{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Christmas Day", :regions => [:za]},
|
{:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Christmas Day", :regions => [:za]},
|
||||||
{:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Day of Goodwill", :regions => [:za]}]
|
{:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Day of Goodwill", :regions => [:za]}],
|
||||||
}
|
8 => [{:mday => 9, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "National Women's Day", :regions => [:za]}],
|
||||||
|
3 => [{:mday => 21, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Human Rights Day", :regions => [:za]}],
|
||||||
|
9 => [{:mday => 24, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Heritage Day", :regions => [:za]}],
|
||||||
|
4 => [{:mday => 27, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Freedom Day", :regions => [:za]}]
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Holidays.merge_defs(Holidays::ZA::DEFINED_REGIONS, Holidays::ZA::HOLIDAYS_BY_MONTH)
|
Holidays.merge_defs(Holidays::ZA.defined_regions, Holidays::ZA.holidays_by_month)
|
||||||
|
|
Loading…
Reference in a new issue