holidays 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +22 -8
- data/Rakefile +26 -8
- data/bin/console +7 -0
- data/bin/setup +5 -0
- data/{data → definitions}/SYNTAX.rdoc +0 -0
- data/{data → definitions}/ar.yaml +0 -0
- data/{data → definitions}/at.yaml +1 -1
- data/{data → definitions}/au.yaml +80 -51
- data/{data → definitions}/be.yaml +0 -0
- data/{data → definitions}/br.yaml +0 -0
- data/{data → definitions}/ca.yaml +0 -0
- data/{data → definitions}/ch.yaml +0 -0
- data/{data → definitions}/cl.yaml +0 -0
- data/{data → definitions}/cr.yaml +0 -0
- data/{data → definitions}/cz.yaml +0 -0
- data/{data → definitions}/de.yaml +25 -34
- data/{data → definitions}/dk.yaml +0 -0
- data/{data → definitions}/ecb_target.yaml +2 -2
- data/{data → definitions}/el.yaml +0 -0
- data/{data → definitions}/es.yaml +37 -26
- data/{data → definitions}/federal_reserve.yaml +0 -0
- data/{data → definitions}/fedex.yaml +9 -3
- data/{data → definitions}/fi.yaml +0 -0
- data/{data → definitions}/fr.yaml +0 -0
- data/{data → definitions}/gb.yaml +19 -19
- data/{data → definitions}/hr.yaml +0 -0
- data/{data → definitions}/hu.yaml +1 -1
- data/{data → definitions}/ie.yaml +0 -0
- data/{data → definitions}/index.yaml +0 -0
- data/{data → definitions}/is.yaml +0 -0
- data/{data → definitions}/it.yaml +0 -0
- data/{data → definitions}/jp.yaml +3 -3
- data/{data → definitions}/li.yaml +3 -3
- data/{data → definitions}/lt.yaml +0 -0
- data/{data → definitions}/ma.yaml +0 -0
- data/{data → definitions}/mx.yaml +0 -0
- data/{data → definitions}/nerc.yaml +0 -0
- data/{data → definitions}/nl.yaml +0 -0
- data/{data → definitions}/no.yaml +0 -0
- data/{data → definitions}/north_america_informal.yaml +0 -0
- data/{data → definitions}/nyse.yaml +0 -0
- data/{data → definitions}/nz.yaml +21 -10
- data/{data → definitions}/ph.yaml +0 -0
- data/{data → definitions}/pl.yaml +0 -0
- data/{data → definitions}/pt.yaml +0 -0
- data/{data → definitions}/ro.yaml +1 -2
- data/{data → definitions}/se.yaml +0 -0
- data/{data → definitions}/sg.yaml +0 -0
- data/{data → definitions}/si.yaml +6 -6
- data/{data → definitions}/sk.yaml +0 -0
- data/{data → definitions}/united_nations.yaml +0 -0
- data/{data → definitions}/ups.yaml +17 -11
- data/{data → definitions}/us.yaml +20 -15
- data/{data → definitions}/ve.yaml +0 -0
- data/{data → definitions}/vi.yaml +0 -0
- data/{data → definitions}/za.yaml +0 -0
- data/holidays.gemspec +2 -1
- data/lib/generated_definitions/MANIFEST +56 -0
- data/lib/generated_definitions/REGIONS.rb +4 -0
- data/lib/{holidays → generated_definitions}/ar.rb +2 -2
- data/lib/{holidays → generated_definitions}/at.rb +2 -2
- data/lib/{holidays → generated_definitions}/au.rb +19 -10
- data/lib/{holidays → generated_definitions}/be.rb +2 -2
- data/lib/{holidays → generated_definitions}/br.rb +2 -2
- data/lib/{holidays → generated_definitions}/ca.rb +2 -2
- data/lib/{holidays → generated_definitions}/ch.rb +2 -2
- data/lib/{holidays → generated_definitions}/cl.rb +2 -2
- data/lib/{holidays → generated_definitions}/cr.rb +2 -2
- data/lib/{holidays → generated_definitions}/cz.rb +2 -2
- data/lib/{holidays → generated_definitions}/de.rb +5 -4
- data/lib/{holidays → generated_definitions}/dk.rb +2 -2
- data/lib/{holidays → generated_definitions}/ecb_target.rb +2 -2
- data/lib/{holidays → generated_definitions}/el.rb +2 -2
- data/lib/{holidays → generated_definitions}/es.rb +6 -6
- data/lib/{holidays → generated_definitions}/europe.rb +7 -6
- data/lib/{holidays → generated_definitions}/fed_ex.rb +8 -3
- data/lib/{holidays → generated_definitions}/federal_reserve.rb +2 -2
- data/lib/{holidays → generated_definitions}/fi.rb +2 -2
- data/lib/{holidays → generated_definitions}/fr.rb +2 -2
- data/lib/{holidays → generated_definitions}/gb.rb +2 -2
- data/lib/{holidays → generated_definitions}/hr.rb +2 -2
- data/lib/{holidays → generated_definitions}/hu.rb +2 -2
- data/lib/{holidays → generated_definitions}/ie.rb +2 -2
- data/lib/{holidays → generated_definitions}/is.rb +2 -2
- data/lib/{holidays → generated_definitions}/it.rb +2 -2
- data/lib/{holidays → generated_definitions}/jp.rb +5 -5
- data/lib/{holidays → generated_definitions}/li.rb +2 -2
- data/lib/{holidays → generated_definitions}/lt.rb +2 -2
- data/lib/{holidays → generated_definitions}/ma.rb +2 -2
- data/lib/{holidays → generated_definitions}/mx.rb +2 -2
- data/lib/{holidays → generated_definitions}/nerc.rb +2 -2
- data/lib/{holidays → generated_definitions}/nl.rb +2 -2
- data/lib/{holidays → generated_definitions}/no.rb +2 -2
- data/lib/{holidays → generated_definitions}/north_america.rb +8 -3
- data/lib/{holidays → generated_definitions}/nyse.rb +2 -2
- data/lib/{holidays → generated_definitions}/nz.rb +5 -5
- data/lib/{holidays → generated_definitions}/ph.rb +2 -2
- data/lib/{holidays → generated_definitions}/pl.rb +2 -2
- data/lib/{holidays → generated_definitions}/pt.rb +2 -2
- data/lib/{holidays → generated_definitions}/ro.rb +2 -2
- data/lib/{holidays → generated_definitions}/scandinavia.rb +2 -2
- data/lib/{holidays → generated_definitions}/se.rb +2 -2
- data/lib/{holidays → generated_definitions}/sg.rb +2 -2
- data/lib/{holidays → generated_definitions}/si.rb +2 -2
- data/lib/{holidays → generated_definitions}/sk.rb +2 -2
- data/lib/{holidays → generated_definitions}/united_nations.rb +2 -2
- data/lib/{holidays → generated_definitions}/ups.rb +8 -3
- data/lib/{holidays → generated_definitions}/us.rb +8 -3
- data/lib/{holidays → generated_definitions}/ve.rb +2 -2
- data/lib/{holidays → generated_definitions}/vi.rb +2 -2
- data/lib/{holidays → generated_definitions}/za.rb +2 -2
- data/lib/holidays.rb +120 -665
- data/lib/holidays/core_extensions/date.rb +39 -0
- data/lib/holidays/date_calculator/day_of_month.rb +68 -0
- data/lib/holidays/date_calculator/easter.rb +58 -0
- data/lib/holidays/date_calculator/weekend_modifier.rb +49 -0
- data/lib/holidays/date_calculator_factory.rb +21 -0
- data/lib/holidays/definition/context/generator.rb +216 -0
- data/lib/holidays/definition/context/merger.rb +26 -0
- data/lib/holidays/definition/repository/cache.rb +33 -0
- data/lib/holidays/definition/repository/holidays_by_month.rb +49 -0
- data/lib/holidays/definition/repository/proc_cache.rb +36 -0
- data/lib/holidays/definition/repository/regions.rb +36 -0
- data/lib/holidays/definition/validator/region.rb +45 -0
- data/lib/holidays/definition_factory.rb +50 -0
- data/lib/holidays/option/context/parse_options.rb +96 -0
- data/lib/holidays/option_factory.rb +14 -0
- data/lib/holidays/use_case/context/between.rb +105 -0
- data/lib/holidays/use_case/context/dates_driver_builder.rb +64 -0
- data/lib/holidays/use_case_factory.rb +20 -0
- data/lib/holidays/version.rb +1 -1
- data/test/defs/test_defs_ar.rb +1 -1
- data/test/defs/test_defs_at.rb +2 -2
- data/test/defs/test_defs_au.rb +61 -43
- data/test/defs/test_defs_be.rb +1 -1
- data/test/defs/test_defs_br.rb +1 -1
- data/test/defs/test_defs_ca.rb +1 -1
- data/test/defs/test_defs_ch.rb +1 -1
- data/test/defs/test_defs_cl.rb +1 -1
- data/test/defs/test_defs_cr.rb +1 -1
- data/test/defs/test_defs_cz.rb +1 -1
- data/test/defs/test_defs_de.rb +18 -30
- data/test/defs/test_defs_dk.rb +1 -1
- data/test/defs/test_defs_ecb_target.rb +3 -3
- data/test/defs/test_defs_el.rb +1 -1
- data/test/defs/test_defs_es.rb +36 -25
- data/test/defs/test_defs_europe.rb +82 -84
- data/test/defs/test_defs_fed_ex.rb +4 -1
- data/test/defs/test_defs_federal_reserve.rb +1 -1
- data/test/defs/test_defs_fi.rb +1 -1
- data/test/defs/test_defs_fr.rb +1 -1
- data/test/defs/test_defs_gb.rb +20 -20
- data/test/defs/test_defs_hr.rb +1 -1
- data/test/defs/test_defs_hu.rb +2 -2
- data/test/defs/test_defs_ie.rb +1 -1
- data/test/defs/test_defs_is.rb +1 -1
- data/test/defs/test_defs_it.rb +1 -1
- data/test/defs/test_defs_jp.rb +1 -1
- data/test/defs/test_defs_li.rb +4 -4
- data/test/defs/test_defs_lt.rb +1 -1
- data/test/defs/test_defs_ma.rb +1 -1
- data/test/defs/test_defs_mx.rb +1 -1
- data/test/defs/test_defs_nerc.rb +1 -1
- data/test/defs/test_defs_nl.rb +1 -1
- data/test/defs/test_defs_no.rb +1 -1
- data/test/defs/test_defs_north_america.rb +5 -3
- data/test/defs/test_defs_nyse.rb +1 -1
- data/test/defs/test_defs_nz.rb +19 -9
- data/test/defs/test_defs_ph.rb +1 -1
- data/test/defs/test_defs_pl.rb +1 -1
- data/test/defs/test_defs_pt.rb +1 -1
- data/test/defs/test_defs_ro.rb +2 -3
- data/test/defs/test_defs_scandinavia.rb +1 -1
- data/test/defs/test_defs_se.rb +1 -1
- data/test/defs/test_defs_sg.rb +1 -1
- data/test/defs/test_defs_si.rb +7 -7
- data/test/defs/test_defs_sk.rb +1 -1
- data/test/defs/test_defs_united_nations.rb +1 -1
- data/test/defs/test_defs_ups.rb +5 -2
- data/test/defs/test_defs_us.rb +5 -3
- data/test/defs/test_defs_ve.rb +1 -1
- data/test/defs/test_defs_vi.rb +1 -1
- data/test/defs/test_defs_za.rb +1 -1
- data/test/{test_date.rb → holidays/core_extensions/test_date.rb} +8 -2
- data/test/holidays/date_calculator/test_day_of_month.rb +27 -0
- data/test/holidays/date_calculator/test_easter.rb +29 -0
- data/test/holidays/date_calculator/test_weekend_modifier.rb +33 -0
- data/test/holidays/definition/context/test_generator.rb +84 -0
- data/test/holidays/definition/context/test_merger.rb +22 -0
- data/test/holidays/definition/repository/test_cache.rb +82 -0
- data/test/holidays/definition/repository/test_holidays_by_month.rb +187 -0
- data/test/holidays/definition/repository/test_proc_cache.rb +29 -0
- data/test/holidays/definition/repository/test_regions.rb +86 -0
- data/test/holidays/definition/validator/test_region.rb +50 -0
- data/test/holidays/option/context/test_parse_options.rb +69 -0
- data/test/holidays/test_date_calculator_factory.rb +21 -0
- data/test/holidays/test_definition_factory.rb +34 -0
- data/test/holidays/test_option_factory.rb +9 -0
- data/test/holidays/test_use_case_factory.rb +13 -0
- data/test/holidays/use_case/context/test_between.rb +75 -0
- data/test/holidays/use_case/context/test_dates_driver_builder.rb +91 -0
- data/test/test_all_regions.rb +14 -3
- data/test/test_helper.rb +2 -1
- data/test/test_holidays.rb +19 -24
- data/test/test_holidays_between.rb +85 -0
- data/test/test_multiple_regions.rb +2 -2
- data/test/test_parse_definitions.rb +10 -4
- metadata +181 -111
- data/.coveralls.yml +0 -1
- data/lib/holidays/MANIFEST +0 -55
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/dk.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/dk'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module DK # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/ecb_target.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/ecb_target'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module ECB_TARGET # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/el.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/el'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module EL # :nodoc:
|
@@ -2,23 +2,23 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/es.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/es'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module ES # :nodoc:
|
15
15
|
def self.defined_regions
|
16
|
-
[:es_pv, :
|
16
|
+
[:es_pv, :es_na, :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, :es, :es_ct, :es_v, :es_vc]
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.holidays_by_month
|
20
20
|
{
|
21
|
-
0 => [{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :
|
21
|
+
0 => [{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_na, :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]},
|
22
22
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
|
23
23
|
{: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]}],
|
24
24
|
1 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Año Nuevo", :regions => [:es]},
|
@@ -26,8 +26,8 @@ module Holidays
|
|
26
26
|
2 => [{:mday => 28, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Andalucía", :regions => [:es_an]}],
|
27
27
|
3 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de las Islas Baleares", :regions => [:es_ib]},
|
28
28
|
{:mday => 19, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]}],
|
29
|
-
4 => [{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "
|
30
|
-
{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Aragón", :regions => [:es_ar]}],
|
29
|
+
4 => [{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Castilla y León", :regions => [:es_cl]},
|
30
|
+
{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San Jorge, Día de Aragón", :regions => [:es_ar]}],
|
31
31
|
5 => [{:mday => 1, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día del Trabajador", :regions => [:es]},
|
32
32
|
{:mday => 2, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Fiesta de la Comunidad", :regions => [:es_m]},
|
33
33
|
{:mday => 30, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de las Canarias", :regions => [:es_cn]},
|
@@ -2,18 +2,18 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/at.yaml, definitions/be.yaml, definitions/ch.yaml, definitions/cz.yaml, definitions/dk.yaml, definitions/de.yaml, definitions/el.yaml, definitions/es.yaml, definitions/fr.yaml, definitions/gb.yaml, definitions/hr.yaml, definitions/hu.yaml, definitions/ie.yaml, definitions/is.yaml, definitions/it.yaml, definitions/li.yaml, definitions/lt.yaml, definitions/nl.yaml, definitions/no.yaml, definitions/pl.yaml, definitions/pt.yaml, definitions/ro.yaml, definitions/sk.yaml, definitions/si.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/europe'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module EUROPE # :nodoc:
|
15
15
|
def self.defined_regions
|
16
|
-
[:at, :be, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_ne, :ch_ge, :ch_ju, :ch_vs, :ch, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_st, :de_bb, :de_mv, :de_sn, :de_th, :el, :es_pv, :
|
16
|
+
[:at, :be, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_ne, :ch_ge, :ch_ju, :ch_vs, :ch, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_st, :de_by_aux, :de_bb, :de_mv, :de_sn, :de_th, :el, :es_pv, :es_na, :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, :es, :es_ct, :es_v, :es_vc, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom, :hr, :hu, :ie, :is, :it, :li, :lt, :nl, :no, :pl, :pt, :ro, :sk, :si]
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.holidays_by_month
|
@@ -56,7 +56,7 @@ module Holidays
|
|
56
56
|
{:function => lambda { |year| Holidays.orthodox_easter(year)+1 }, :function_id => "orthodox_easter(year)+1", :name => "Δευτέρα του Πάσχα", :regions => [:el]},
|
57
57
|
{:function => lambda { |year| Holidays.orthodox_easter(year)-48 }, :function_id => "orthodox_easter(year)-48", :name => "Καθαρά Δευτέρα", :regions => [:el]},
|
58
58
|
{:function => lambda { |year| Holidays.orthodox_easter(year)+50 }, :function_id => "orthodox_easter(year)+50", :name => "Αγίου Πνεύματος", :regions => [:el]},
|
59
|
-
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :
|
59
|
+
{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_na, :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]},
|
60
60
|
{:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
|
61
61
|
{: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]},
|
62
62
|
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :type => :informal, :name => "Pâques", :regions => [:fr]},
|
@@ -219,6 +219,7 @@ module Holidays
|
|
219
219
|
{:mday => 1, :name => "Bundesfeiertag", :regions => [:ch]},
|
220
220
|
{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_ag, :ch_ti, :ch_vs, :ch_ju]},
|
221
221
|
{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]},
|
222
|
+
{:mday => 8, :name => "Friedensfest", :regions => [:de_by_aux]},
|
222
223
|
{:mday => 15, :name => "Κοίμηση της Θεοτόκου", :regions => [:el]},
|
223
224
|
{:mday => 15, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Asunción", :regions => [:es]},
|
224
225
|
{:mday => 15, :name => "Assomption", :regions => [:fr]},
|
@@ -373,8 +374,8 @@ module Holidays
|
|
373
374
|
{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
|
374
375
|
{:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
|
375
376
|
{:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]},
|
376
|
-
{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "
|
377
|
-
{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Aragón", :regions => [:es_ar]},
|
377
|
+
{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "Día de Castilla y León", :regions => [:es_cl]},
|
378
|
+
{:mday => 23, :observed => lambda { |date| Holidays.to_monday_if_sunday(date) }, :observed_id => "to_monday_if_sunday", :name => "San Jorge, Día de Aragón", :regions => [:es_ar]},
|
378
379
|
{:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]},
|
379
380
|
{:mday => 25, :name => "Festa della Liberazione", :regions => [:it]},
|
380
381
|
{:mday => 27, :name => "Koningsdag", :regions => [:nl]},
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/fedex.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/fed_ex'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module FED_EX # :nodoc:
|
@@ -23,13 +23,18 @@ module Holidays
|
|
23
23
|
7 => [{:mday => 4, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Independence Day", :regions => [:fedex]}],
|
24
24
|
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:fedex]}],
|
25
25
|
11 => [{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:fedex]},
|
26
|
-
{:
|
26
|
+
{:function => lambda { |year| Holidays.day_after_thanksgiving(year) }, :function_id => "day_after_thanksgiving(year)", :name => "Day After Thanksgiving", :regions => [:fedex]}],
|
27
27
|
12 => [{:mday => 25, :observed => lambda { |date| Holidays.to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "Christmas Day", :regions => [:fedex]},
|
28
28
|
{:mday => 31, :name => "New Year's Eve", :regions => [:fedex]}]
|
29
29
|
}
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
def self.day_after_thanksgiving(year)
|
34
|
+
Date.calculate_mday(year, 11, 4, 4) + 1
|
35
|
+
end
|
36
|
+
|
37
|
+
|
33
38
|
|
34
39
|
end
|
35
40
|
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/federal_reserve.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/federal_reserve'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module FEDERAL_RESERVE # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/fi.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/fi'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module FI # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/fr.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/fr'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module FR # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/gb.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/gb'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module GB # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/hr.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/hr'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module HR # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/hu.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/hu'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module HU # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/ie.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/ie'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module IE # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/is.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/is'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module IS # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/it.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/it'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module IT # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/jp.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/jp'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module JP # :nodoc:
|
@@ -34,14 +34,14 @@ module Holidays
|
|
34
34
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 5, 4) }, :function_id => "jp_substitute_holiday(year, 5, 4)", :name => "振替休日", :regions => [:jp]},
|
35
35
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 5, 5) }, :function_id => "jp_substitute_holiday(year, 5, 5)", :name => "振替休日", :regions => [:jp]}],
|
36
36
|
7 => [{:wday => 1, :week => 3, :name => "海の日", :regions => [:jp]},
|
37
|
-
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 7,
|
37
|
+
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 7, Holidays.calculate_day_of_month(year, 7, 3, 1)) }, :function_id => "jp_substitute_holiday(year, 7, Holidays.calculate_day_of_month(year, 7, 3, 1))", :name => "振替休日", :regions => [:jp]}],
|
38
38
|
9 => [{:wday => 1, :week => 3, :name => "敬老の日", :regions => [:jp]},
|
39
|
-
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 9,
|
39
|
+
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 9, Holidays.calculate_day_of_month(year, 9, 3, 1)) }, :function_id => "jp_substitute_holiday(year, 9, Holidays.calculate_day_of_month(year, 9, 3, 1))", :name => "振替休日", :regions => [:jp]},
|
40
40
|
{:function => lambda { |year| Holidays.jp_citizons_holiday(year) }, :function_id => "jp_citizons_holiday(year)", :name => "国民の休日", :regions => [:jp]},
|
41
41
|
{:function => lambda { |year| Holidays.jp_national_culture_day(year) }, :function_id => "jp_national_culture_day(year)", :name => "秋分の日", :regions => [:jp]},
|
42
42
|
{: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]}],
|
43
43
|
10 => [{:wday => 1, :week => 2, :name => "体育の日", :regions => [:jp]},
|
44
|
-
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 10,
|
44
|
+
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 10, Holidays.calculate_day_of_month(year, 10, 2, 1)) }, :function_id => "jp_substitute_holiday(year, 10, Holidays.calculate_day_of_month(year, 10, 2, 1))", :name => "振替休日", :regions => [:jp]}],
|
45
45
|
11 => [{:mday => 3, :name => "文化の日", :regions => [:jp]},
|
46
46
|
{:function => lambda { |year| Holidays.jp_substitute_holiday(year, 11, 3) }, :function_id => "jp_substitute_holiday(year, 11, 3)", :name => "振替休日", :regions => [:jp]},
|
47
47
|
{:mday => 23, :name => "勤労感謝の日", :regions => [:jp]},
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/li.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/li'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module LI # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/lt.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/lt'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module LT # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/ma.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/ma'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module MA # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/mx.yaml, definitions/north_america_informal.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/mx'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module MX # :nodoc:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded:
|
5
|
+
# Definitions loaded: definitions/nerc.yaml
|
6
6
|
#
|
7
7
|
# To use the definitions in this file, load it right after you load the
|
8
8
|
# Holiday gem:
|
9
9
|
#
|
10
10
|
# require 'holidays'
|
11
|
-
# require '
|
11
|
+
# require 'generated_definitions/nerc'
|
12
12
|
#
|
13
13
|
# All the definitions are available at https://github.com/alexdunae/holidays
|
14
14
|
module NERC # :nodoc:
|