41 lines
1.6 KiB
Ruby
41 lines
1.6 KiB
Ruby
# encoding: utf-8
|
|
module Holidays
|
|
# This file is generated by the Ruby Holidays gem.
|
|
#
|
|
# Definitions loaded: data/it.yaml
|
|
#
|
|
# To use the definitions in this file, load it right after you load the
|
|
# Holiday gem:
|
|
#
|
|
# require 'holidays'
|
|
# require 'holidays/it'
|
|
#
|
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
|
module IT # :nodoc:
|
|
def self.defined_regions
|
|
[:it]
|
|
end
|
|
|
|
def self.holidays_by_month
|
|
{
|
|
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]}],
|
|
1 => [{:mday => 1, :name => "Capodanno", :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]},
|
|
{:mday => 25, :name => "Natale", :regions => [:it]},
|
|
{:mday => 26, :name => "Santo Stefano", :regions => [:it]}]
|
|
}
|
|
end
|
|
end
|
|
|
|
|
|
end
|
|
|
|
Holidays.merge_defs(Holidays::IT.defined_regions, Holidays::IT.holidays_by_month)
|