holidays 5.6.0 → 5.7.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 +7 -0
- data/README.md +1 -1
- data/holidays.gemspec +2 -1
- data/lib/generated_definitions/MANIFEST +8 -0
- data/lib/generated_definitions/REGIONS.rb +2 -2
- data/lib/generated_definitions/au.rb +2 -2
- data/lib/generated_definitions/de.rb +4 -4
- data/lib/generated_definitions/ee.rb +36 -0
- data/lib/generated_definitions/europe.rb +8 -4
- data/lib/generated_definitions/fr.rb +5 -3
- data/lib/generated_definitions/ge.rb +41 -0
- data/lib/generated_definitions/mt_en.rb +38 -0
- data/lib/generated_definitions/mt_mt.rb +38 -0
- data/lib/generated_definitions/north_america.rb +106 -9
- data/lib/generated_definitions/nz.rb +0 -1
- data/lib/generated_definitions/pt.rb +4 -2
- data/lib/generated_definitions/rs_cyrl.rb +39 -0
- data/lib/generated_definitions/rs_la.rb +39 -0
- data/lib/generated_definitions/ru.rb +37 -0
- data/lib/generated_definitions/tr.rb +61 -0
- data/lib/generated_definitions/us.rb +112 -15
- data/lib/holidays/version.rb +1 -1
- data/test/coverage_report.rb +4 -2
- data/test/defs/test_defs_au.rb +2 -2
- data/test/defs/test_defs_de.rb +39 -37
- data/test/defs/test_defs_ee.rb +33 -0
- data/test/defs/test_defs_europe.rb +84 -68
- data/test/defs/test_defs_fr.rb +21 -13
- data/test/defs/test_defs_ge.rb +41 -0
- data/test/defs/test_defs_mt_en.rb +32 -0
- data/test/defs/test_defs_mt_mt.rb +32 -0
- data/test/defs/test_defs_north_america.rb +244 -16
- data/test/defs/test_defs_pt.rb +24 -18
- data/test/defs/test_defs_rs_cyrl.rb +39 -0
- data/test/defs/test_defs_rs_la.rb +39 -0
- data/test/defs/test_defs_ru.rb +28 -0
- data/test/defs/test_defs_tr.rb +44 -0
- data/test/defs/test_defs_us.rb +245 -17
- data/test/integration/test_available_regions.rb +1 -1
- data/test/integration/test_holidays.rb +2 -2
- metadata +65 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 234f8ef4fb4713b7b9c50ea60389e9868c220951
|
4
|
+
data.tar.gz: 166a9f5b82c4399c99c8a80d4227f8f22c35138d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8adac311ee5aaab7272f300d8edda28a8efa41b0448725a376202ac70e9eeb28ce6283e2cbb88d91c133585ee8863122d9ac7562450abd8ae68c24d06daa365d
|
7
|
+
data.tar.gz: 5ed5e47aa09290c931baf02ae3a6be7bdea0885d85591ba0499b103666af90616d3e25e0ec5235bd1124d1fa656fcc86530eafad1f898df671b724faae58ec80
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Ruby Holidays Gem CHANGELOG
|
2
2
|
|
3
|
+
## 5.7.0
|
4
|
+
|
5
|
+
* Update to [v1.7.1 definitions](https://github.com/holidays/definitions/releases/tag/v1.7.1). Please see the
|
6
|
+
definitions repository for the list of changes.
|
7
|
+
* Remove 'coveralls'. We never looked at the reports. We will we simplecov to enforce test coverage. It will
|
8
|
+
start off being set to require 99% and above.
|
9
|
+
|
3
10
|
## 5.6.0
|
4
11
|
|
5
12
|
* Update to v1.6.1 definitions, which includes updates for the `:ca` region (and subregions)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ruby Holidays Gem [![Build Status](https://travis-ci.org/holidays/holidays.svg?branch=master)](https://travis-ci.org/holidays/holidays)
|
1
|
+
# Ruby Holidays Gem [![Build Status](https://travis-ci.org/holidays/holidays.svg?branch=master)](https://travis-ci.org/holidays/holidays)
|
2
2
|
|
3
3
|
A set of functions to deal with holidays in Ruby.
|
4
4
|
|
data/holidays.gemspec
CHANGED
@@ -19,7 +19,8 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.required_ruby_version = '~> 2.1'
|
20
20
|
gem.add_development_dependency 'bundler'
|
21
21
|
gem.add_development_dependency 'rake'
|
22
|
-
gem.add_development_dependency '
|
22
|
+
gem.add_development_dependency 'simplecov'
|
23
|
+
gem.add_development_dependency 'simplecov-rcov'
|
23
24
|
gem.add_development_dependency 'test-unit'
|
24
25
|
gem.add_development_dependency 'mocha', '~>1.0'
|
25
26
|
gem.add_development_dependency 'pry', '~>0.10'
|
@@ -18,6 +18,7 @@ The following definition files are included in this installation:
|
|
18
18
|
* generated_definitions/de
|
19
19
|
* generated_definitions/dk
|
20
20
|
* generated_definitions/ecb_target
|
21
|
+
* generated_definitions/ee
|
21
22
|
* generated_definitions/el
|
22
23
|
* generated_definitions/es
|
23
24
|
* generated_definitions/europe
|
@@ -26,6 +27,7 @@ The following definition files are included in this installation:
|
|
26
27
|
* generated_definitions/fi
|
27
28
|
* generated_definitions/fr
|
28
29
|
* generated_definitions/gb
|
30
|
+
* generated_definitions/ge
|
29
31
|
* generated_definitions/hk
|
30
32
|
* generated_definitions/hr
|
31
33
|
* generated_definitions/hu
|
@@ -38,6 +40,8 @@ The following definition files are included in this installation:
|
|
38
40
|
* generated_definitions/lt
|
39
41
|
* generated_definitions/lu
|
40
42
|
* generated_definitions/ma
|
43
|
+
* generated_definitions/mt_en
|
44
|
+
* generated_definitions/mt_mt
|
41
45
|
* generated_definitions/mx
|
42
46
|
* generated_definitions/my
|
43
47
|
* generated_definitions/nerc
|
@@ -51,12 +55,16 @@ The following definition files are included in this installation:
|
|
51
55
|
* generated_definitions/pl
|
52
56
|
* generated_definitions/pt
|
53
57
|
* generated_definitions/ro
|
58
|
+
* generated_definitions/rs_cyrl
|
59
|
+
* generated_definitions/rs_la
|
60
|
+
* generated_definitions/ru
|
54
61
|
* generated_definitions/scandinavia
|
55
62
|
* generated_definitions/se
|
56
63
|
* generated_definitions/sg
|
57
64
|
* generated_definitions/si
|
58
65
|
* generated_definitions/sk
|
59
66
|
* generated_definitions/tn
|
67
|
+
* generated_definitions/tr
|
60
68
|
* generated_definitions/united_nations
|
61
69
|
* generated_definitions/ups
|
62
70
|
* generated_definitions/us
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
module Holidays
|
3
|
-
REGIONS = [:ar, :at, :au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_wa, :au_tas, :au_tas_south, :au_qld_cairns, :au_qld_brisbane, :au_tas_north, :au_vic_melbourne, :be_fr, :be_nl, :br, :bg_en, :bg_bg, :ca, :ca_qc, :ca_ab, :ca_sk, :ca_on, :ca_bc, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_yt, :ca_nb, :us, :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, :cl, :cr, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :
|
3
|
+
REGIONS = [:ar, :at, :au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_wa, :au_tas, :au_tas_south, :au_qld_cairns, :au_qld_brisbane, :au_tas_north, :au_vic_melbourne, :be_fr, :be_nl, :br, :bg_en, :bg_bg, :ca, :ca_qc, :ca_ab, :ca_sk, :ca_on, :ca_bc, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_yt, :ca_nb, :us, :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, :cl, :cr, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_sh, :de_ni, :de_hh, :de_hb, :de_be, :de_bb, :de_mv, :de_th, :ecb_target, :ee, :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, :federal_reserve, :fedex, :fi, :fr_a, :fr_m, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom, :ge, :hr, :hk, :hu, :ie, :is, :it, :kr, :li, :lt, :ma, :mt_mt, :mt_en, :mx, :mx_pue, :nerc, :nl, :lu, :no, :nyse, :nz, :nz_sl, :nz_we, :nz_ak, :nz_nl, :nz_ne, :nz_ot, :nz_ta, :nz_sc, :nz_hb, :nz_mb, :nz_ca, :nz_ch, :nz_wl, :pe, :ph, :pl, :pt, :pt_li, :pt_po, :ro, :rs_cyrl, :rs_la, :ru, :se, :tn, :tr, :us_fl, :us_la, :us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn, :us_ms, :us_id, :us_ar, :us_tx, :us_dc, :us_md, :us_va, :us_il, :us_vt, :us_ak, :us_ca, :us_me, :us_ma, :us_al, :us_ga, :us_ne, :us_mo, :us_sc, :us_wv, :us_vi, :us_ut, :us_ri, :us_az, :us_co, :us_mt, :us_nm, :us_ny, :us_oh, :us_pa, :us_mi, :us_mn, :us_nv, :us_or, :us_sd, :us_wa, :us_wi, :us_wy, :us_ia, :us_ks, :us_nh, :us_ok, :united_nations, :ups, :za, :sk, :si, :jp, :ve, :vi, :sg, :my]
|
4
4
|
|
5
|
-
PARENT_REGION_LOOKUP = {:ar=>:ar, :at=>:at, :au=>:au, :au_nsw=>:au, :au_vic=>:au, :au_qld=>:au, :au_nt=>:au, :au_act=>:au, :au_sa=>:au, :au_wa=>:au, :au_tas=>:au, :au_tas_south=>:au, :au_qld_cairns=>:au, :au_qld_brisbane=>:au, :au_tas_north=>:au, :au_vic_melbourne=>:au, :be_fr=>:be_fr, :be_nl=>:be_nl, :br=>:br, :bg_en=>:bg, :bg_bg=>:bg, :ca=>:ca, :ca_qc=>:ca, :ca_ab=>:ca, :ca_sk=>:ca, :ca_on=>:ca, :ca_bc=>:ca, :ca_mb=>:ca, :ca_ns=>:ca, :ca_pe=>:ca, :ca_nl=>:ca, :ca_nt=>:ca, :ca_nu=>:ca, :ca_yt=>:ca, :ca_nb=>:ca, :us=>:ca, :ch_zh=>:ch, :ch_be=>:ch, :ch_lu=>:ch, :ch_ur=>:ch, :ch_sz=>:ch, :ch_ow=>:ch, :ch_nw=>:ch, :ch_gl=>:ch, :ch_zg=>:ch, :ch_fr=>:ch, :ch_so=>:ch, :ch_bs=>:ch, :ch_bl=>:ch, :ch_sh=>:ch, :ch_ar=>:ch, :ch_ai=>:ch, :ch_sg=>:ch, :ch_gr=>:ch, :ch_ag=>:ch, :ch_tg=>:ch, :ch_ti=>:ch, :ch_vd=>:ch, :ch_ne=>:ch, :ch_ge=>:ch, :ch_ju=>:ch, :ch_vs=>:ch, :ch=>:ch, :cl=>:cl, :cr=>:cr, :cz=>:cz, :dk=>:dk, :de=>:de, :de_bw=>:de, :de_by=>:de, :de_he=>:de, :de_nw=>:de, :de_rp=>:de, :de_sl=>:de, :de_sn_sorbian=>:de, :
|
5
|
+
PARENT_REGION_LOOKUP = {:ar=>:ar, :at=>:at, :au=>:au, :au_nsw=>:au, :au_vic=>:au, :au_qld=>:au, :au_nt=>:au, :au_act=>:au, :au_sa=>:au, :au_wa=>:au, :au_tas=>:au, :au_tas_south=>:au, :au_qld_cairns=>:au, :au_qld_brisbane=>:au, :au_tas_north=>:au, :au_vic_melbourne=>:au, :be_fr=>:be_fr, :be_nl=>:be_nl, :br=>:br, :bg_en=>:bg, :bg_bg=>:bg, :ca=>:ca, :ca_qc=>:ca, :ca_ab=>:ca, :ca_sk=>:ca, :ca_on=>:ca, :ca_bc=>:ca, :ca_mb=>:ca, :ca_ns=>:ca, :ca_pe=>:ca, :ca_nl=>:ca, :ca_nt=>:ca, :ca_nu=>:ca, :ca_yt=>:ca, :ca_nb=>:ca, :us=>:ca, :ch_zh=>:ch, :ch_be=>:ch, :ch_lu=>:ch, :ch_ur=>:ch, :ch_sz=>:ch, :ch_ow=>:ch, :ch_nw=>:ch, :ch_gl=>:ch, :ch_zg=>:ch, :ch_fr=>:ch, :ch_so=>:ch, :ch_bs=>:ch, :ch_bl=>:ch, :ch_sh=>:ch, :ch_ar=>:ch, :ch_ai=>:ch, :ch_sg=>:ch, :ch_gr=>:ch, :ch_ag=>:ch, :ch_tg=>:ch, :ch_ti=>:ch, :ch_vd=>:ch, :ch_ne=>:ch, :ch_ge=>:ch, :ch_ju=>:ch, :ch_vs=>:ch, :ch=>:ch, :cl=>:cl, :cr=>:cr, :cz=>:cz, :dk=>:dk, :de=>:de, :de_bw=>:de, :de_by=>:de, :de_he=>:de, :de_nw=>:de, :de_rp=>:de, :de_sl=>:de, :de_sn_sorbian=>:de, :de_th_cath=>:de, :de_sn=>:de, :de_st=>:de, :de_by_cath=>:de, :de_by_augsburg=>:de, :de_sh=>:de, :de_ni=>:de, :de_hh=>:de, :de_hb=>:de, :de_be=>:de, :de_bb=>:de, :de_mv=>:de, :de_th=>:de, :ecb_target=>:ecb_target, :ee=>:ee, :el=>:el, :es_pv=>:es, :es_na=>:es, :es_an=>:es, :es_ib=>:es, :es_cm=>:es, :es_mu=>:es, :es_m=>:es, :es_ar=>:es, :es_cl=>:es, :es_cn=>:es, :es_lo=>:es, :es_ga=>:es, :es_ce=>:es, :es_o=>:es, :es_ex=>:es, :es=>:es, :es_ct=>:es, :es_v=>:es, :es_vc=>:es, :federal_reserve=>:federal_reserve, :fedex=>:fedex, :fi=>:fi, :fr_a=>:fr, :fr_m=>:fr, :fr=>:fr, :gb=>:gb, :gb_eng=>:gb, :gb_wls=>:gb, :gb_eaw=>:gb, :gb_nir=>:gb, :gb_sct=>:gb, :gb_con=>:gb, :je=>:gb, :gb_jsy=>:gb, :gg=>:gb, :gb_gsy=>:gb, :im=>:gb, :gb_iom=>:gb, :ge=>:ge, :hr=>:hr, :hk=>:hk, :hu=>:hu, :ie=>:ie, :is=>:is, :it=>:it, :kr=>:kr, :li=>:li, :lt=>:lt, :ma=>:ma, :mt_mt=>:mt_mt, :mt_en=>:mt_en, :mx=>:mx, :mx_pue=>:mx, :nerc=>:nerc, :nl=>:nl, :lu=>:lu, :no=>:no, :nyse=>:nyse, :nz=>:nz, :nz_sl=>:nz, :nz_we=>:nz, :nz_ak=>:nz, :nz_nl=>:nz, :nz_ne=>:nz, :nz_ot=>:nz, :nz_ta=>:nz, :nz_sc=>:nz, :nz_hb=>:nz, :nz_mb=>:nz, :nz_ca=>:nz, :nz_ch=>:nz, :nz_wl=>:nz, :pe=>:pe, :ph=>:ph, :pl=>:pl, :pt=>:pt, :pt_li=>:pt, :pt_po=>:pt, :ro=>:ro, :rs_cyrl=>:rs_cyrl, :rs_la=>:rs_la, :ru=>:ru, :se=>:se, :tn=>:tn, :tr=>:tr, :us_fl=>:us, :us_la=>:us, :us_ct=>:us, :us_de=>:us, :us_gu=>:us, :us_hi=>:us, :us_in=>:us, :us_ky=>:us, :us_nj=>:us, :us_nc=>:us, :us_nd=>:us, :us_pr=>:us, :us_tn=>:us, :us_ms=>:us, :us_id=>:us, :us_ar=>:us, :us_tx=>:us, :us_dc=>:us, :us_md=>:us, :us_va=>:us, :us_il=>:us, :us_vt=>:us, :us_ak=>:us, :us_ca=>:us, :us_me=>:us, :us_ma=>:us, :us_al=>:us, :us_ga=>:us, :us_ne=>:us, :us_mo=>:us, :us_sc=>:us, :us_wv=>:us, :us_vi=>:us, :us_ut=>:us, :us_ri=>:us, :us_az=>:us, :us_co=>:us, :us_mt=>:us, :us_nm=>:us, :us_ny=>:us, :us_oh=>:us, :us_pa=>:us, :us_mi=>:us, :us_mn=>:us, :us_nv=>:us, :us_or=>:us, :us_sd=>:us, :us_wa=>:us, :us_wi=>:us, :us_wy=>:us, :us_ia=>:us, :us_ks=>:us, :us_nh=>:us, :us_ok=>:us, :united_nations=>:united_nations, :ups=>:ups, :za=>:za, :sk=>:europe, :si=>:europe, :jp=>:jp, :ve=>:ve, :vi=>:vi, :sg=>:sg, :my=>:my}
|
6
6
|
end
|
@@ -15,7 +15,7 @@ module Holidays
|
|
15
15
|
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:au]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Easter Saturday", :regions => [:au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:au_nsw, :au_vic]},
|
18
|
-
{:function => "easter(year)", :function_arguments => [:year], :year_ranges => [{:after => 2017}],:name => "Easter Sunday", :regions => [:au_qld]},
|
18
|
+
{:function => "easter(year)", :function_arguments => [:year], :year_ranges => [{:after => 2017}],:name => "Easter Sunday", :regions => [:au_qld, :au_act]},
|
19
19
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:au]}],
|
20
20
|
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:au, :au_nsw, :au_vic, :au_act, :au_sa, :au_wa, :au_nt, :au_qld]},
|
21
21
|
{:mday => 1, :function => "to_monday_if_weekend(date)", :function_arguments => [:date], :name => "New Year's Day", :regions => [:au_tas]},
|
@@ -51,7 +51,7 @@ module Holidays
|
|
51
51
|
12 => [{:mday => 25, :observed => "to_tuesday_if_sunday_or_monday_if_saturday(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:au_qld, :au_nsw, :au_act, :au_tas, :au_wa, :au_vic, :au_nt]},
|
52
52
|
{:mday => 26, :observed => "to_tuesday_if_sunday_or_monday_if_saturday(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:au_nsw, :au_vic, :au_qld, :au_act, :au_wa]},
|
53
53
|
{:function => "to_weekday_if_boxing_weekend_from_year(year)", :function_arguments => [:year], :name => "Boxing Day", :regions => [:au_tas, :au_nt]},
|
54
|
-
{:function => "to_weekday_if_boxing_weekend_from_year_or_to_tuesday_if_monday(year)", :function_arguments => [:year], :name => "
|
54
|
+
{:function => "to_weekday_if_boxing_weekend_from_year_or_to_tuesday_if_monday(year)", :function_arguments => [:year], :name => "Proclamation Day", :regions => [:au_sa]},
|
55
55
|
{:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:au_sa]}]
|
56
56
|
}
|
57
57
|
end
|
@@ -7,7 +7,7 @@ module Holidays
|
|
7
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
8
8
|
module DE # :nodoc:
|
9
9
|
def self.defined_regions
|
10
|
-
[:de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :
|
10
|
+
[:de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_sh, :de_ni, :de_hh, :de_hb, :de_be, :de_bb, :de_mv, :de_th]
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
@@ -18,17 +18,17 @@ module Holidays
|
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Christi Himmelfahrt", :regions => [:de]},
|
19
19
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :type => :informal, :name => "Pfingstsonntag", :regions => [:de]},
|
20
20
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Pfingstmontag", :regions => [:de]},
|
21
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :
|
21
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath]},
|
22
22
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -52, :type => :informal, :name => "Weiberfastnacht", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]},
|
23
23
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :type => :informal, :name => "Rosenmontag", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]},
|
24
24
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -46, :type => :informal, :name => "Aschermittwoch", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]}],
|
25
25
|
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:de]},
|
26
26
|
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]}],
|
27
27
|
5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]}],
|
28
|
-
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:
|
28
|
+
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by_cath, :de_by_augsburg, :de_sl]},
|
29
29
|
{:mday => 8, :name => "Friedensfest", :regions => [:de_by_augsburg]}],
|
30
30
|
10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
31
|
-
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
|
31
|
+
{:mday => 31, :name => "Reformationstag", :regions => [:de_sh, :de_ni, :de_hh, :de_hb, :de_be, :de_bb, :de_mv, :de_sn, :de_st, :de_th]},
|
32
32
|
{:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
|
33
33
|
{:mday => 31, :year_ranges => [{:limited => [2017]}],:name => "Reformationstag", :regions => [:de]}],
|
34
34
|
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Holidays
|
3
|
+
# This file is generated by the Ruby Holidays gem.
|
4
|
+
#
|
5
|
+
# Definitions loaded: definitions/ee.yaml
|
6
|
+
#
|
7
|
+
# All the definitions are available at https://github.com/holidays/holidays
|
8
|
+
module EE # :nodoc:
|
9
|
+
def self.defined_regions
|
10
|
+
[:ee]
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.holidays_by_month
|
14
|
+
{
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "suur reede", :regions => [:ee]},
|
16
|
+
{:function => "easter(year)", :function_arguments => [:year], :name => "ülestõusmispühade 1. püha", :regions => [:ee]},
|
17
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "nelipühade 1. püha", :regions => [:ee]}],
|
18
|
+
1 => [{:mday => 1, :name => "uusaasta", :regions => [:ee]}],
|
19
|
+
2 => [{:mday => 24, :name => "iseseisvuspäev", :regions => [:ee]}],
|
20
|
+
5 => [{:mday => 1, :name => "kevadpüha", :regions => [:ee]}],
|
21
|
+
6 => [{:mday => 23, :name => "võidupüha ja jaanilaupäev", :regions => [:ee]},
|
22
|
+
{:mday => 24, :name => "jaanipäev", :regions => [:ee]}],
|
23
|
+
8 => [{:mday => 20, :name => "taasiseseisvumispäev", :regions => [:ee]}],
|
24
|
+
12 => [{:mday => 24, :name => "jõululaupäev", :regions => [:ee]},
|
25
|
+
{:mday => 25, :name => "esimene jõulupüha", :regions => [:ee]},
|
26
|
+
{:mday => 26, :name => "teine jõulupüha", :regions => [:ee]}]
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.custom_methods
|
31
|
+
{
|
32
|
+
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -7,7 +7,7 @@ module Holidays
|
|
7
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
8
8
|
module EUROPE # :nodoc:
|
9
9
|
def self.defined_regions
|
10
|
-
[:at, :be_fr, :be_nl, :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_sn_sorbian, :
|
10
|
+
[:at, :be_fr, :be_nl, :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_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_sh, :de_ni, :de_hh, :de_hb, :de_be, :de_bb, :de_mv, :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_a, :fr_m, :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, :pt_li, :pt_po, :ro, :sk, :si, :bg_en, :bg_bg]
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
@@ -51,7 +51,7 @@ module Holidays
|
|
51
51
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Christi Himmelfahrt", :regions => [:de]},
|
52
52
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :type => :informal, :name => "Pfingstsonntag", :regions => [:de]},
|
53
53
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Pfingstmontag", :regions => [:de]},
|
54
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :
|
54
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath]},
|
55
55
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -52, :type => :informal, :name => "Weiberfastnacht", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]},
|
56
56
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :type => :informal, :name => "Rosenmontag", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]},
|
57
57
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -46, :type => :informal, :name => "Aschermittwoch", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]},
|
@@ -64,6 +64,7 @@ module Holidays
|
|
64
64
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -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]},
|
65
65
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:es]},
|
66
66
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
|
67
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Vendredi saint", :regions => [:fr_a, :fr_m]},
|
67
68
|
{:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pâques", :regions => [:fr]},
|
68
69
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lundi de Pâques", :regions => [:fr]},
|
69
70
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Ascension", :regions => [:fr]},
|
@@ -242,7 +243,7 @@ module Holidays
|
|
242
243
|
{:mday => 15, :name => "O.L.V. Hemelvaart", :regions => [:be_nl]},
|
243
244
|
{:mday => 1, :name => "Bundesfeiertag", :regions => [:ch]},
|
244
245
|
{: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]},
|
245
|
-
{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:
|
246
|
+
{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by_cath, :de_by_augsburg, :de_sl]},
|
246
247
|
{:mday => 8, :name => "Friedensfest", :regions => [:de_by_augsburg]},
|
247
248
|
{:mday => 15, :name => "Κοίμηση της Θεοτόκου", :regions => [:el]},
|
248
249
|
{:mday => 15, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Asunción", :regions => [:es]},
|
@@ -266,7 +267,7 @@ module Holidays
|
|
266
267
|
10 => [{:mday => 26, :name => "Nationalfeiertag", :regions => [:at]},
|
267
268
|
{:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]},
|
268
269
|
{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
|
269
|
-
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
|
270
|
+
{:mday => 31, :name => "Reformationstag", :regions => [:de_sh, :de_ni, :de_hh, :de_hb, :de_be, :de_bb, :de_mv, :de_sn, :de_st, :de_th]},
|
270
271
|
{:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
|
271
272
|
{:mday => 31, :year_ranges => [{:limited => [2017]}],:name => "Reformationstag", :regions => [:de]},
|
272
273
|
{:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]},
|
@@ -338,6 +339,7 @@ module Holidays
|
|
338
339
|
{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Navidad del Señor", :regions => [:es]},
|
339
340
|
{:mday => 26, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "San Esteban", :regions => [:es_ib, :es_ct]},
|
340
341
|
{:mday => 25, :name => "Noël", :regions => [:fr]},
|
342
|
+
{:mday => 26, :name => "Saint-Étienne", :regions => [:fr_a, :fr_m]},
|
341
343
|
{:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:gb]},
|
342
344
|
{:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:gb]},
|
343
345
|
{:mday => 25, :name => "Božić", :regions => [:hr]},
|
@@ -445,6 +447,8 @@ module Holidays
|
|
445
447
|
{:mday => 24, :name => "Joninės", :regions => [:lt]},
|
446
448
|
{:mday => 23, :type => :informal, :name => "Dzień Ojca", :regions => [:pl]},
|
447
449
|
{:mday => 10, :name => "Dia de Portugal", :regions => [:pt]},
|
450
|
+
{:mday => 13, :name => "Dia de Santo António", :regions => [:pt_li]},
|
451
|
+
{:mday => 24, :name => "Dia de São João", :regions => [:pt_po]},
|
448
452
|
{:mday => 25, :name => "dan državnosti", :regions => [:si]}],
|
449
453
|
9 => [{:mday => 22, :name => "Mauritiustag", :regions => [:ch_ai]},
|
450
454
|
{:mday => 25, :name => "Bruderklausenfest", :regions => [:ch_ow]},
|
@@ -7,12 +7,13 @@ module Holidays
|
|
7
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
8
8
|
module FR # :nodoc:
|
9
9
|
def self.defined_regions
|
10
|
-
[:fr]
|
10
|
+
[:fr_a, :fr_m, :fr]
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
0 => [{:function => "easter(year)", :function_arguments => [:year], :
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Vendredi saint", :regions => [:fr_a, :fr_m]},
|
16
|
+
{:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pâques", :regions => [:fr]},
|
16
17
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lundi de Pâques", :regions => [:fr]},
|
17
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Ascension", :regions => [:fr]},
|
18
19
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :type => :informal, :name => "Pentecôte", :regions => [:fr]},
|
@@ -24,7 +25,8 @@ module Holidays
|
|
24
25
|
8 => [{:mday => 15, :name => "Assomption", :regions => [:fr]}],
|
25
26
|
11 => [{:mday => 1, :name => "Toussaint", :regions => [:fr]},
|
26
27
|
{:mday => 11, :name => "Armistice 1918", :regions => [:fr]}],
|
27
|
-
12 => [{:mday => 25, :name => "Noël", :regions => [:fr]}
|
28
|
+
12 => [{:mday => 25, :name => "Noël", :regions => [:fr]},
|
29
|
+
{:mday => 26, :name => "Saint-Étienne", :regions => [:fr_a, :fr_m]}]
|
28
30
|
}
|
29
31
|
end
|
30
32
|
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Holidays
|
3
|
+
# This file is generated by the Ruby Holidays gem.
|
4
|
+
#
|
5
|
+
# Definitions loaded: definitions/ge.yaml
|
6
|
+
#
|
7
|
+
# All the definitions are available at https://github.com/holidays/holidays
|
8
|
+
module GE # :nodoc:
|
9
|
+
def self.defined_regions
|
10
|
+
[:ge]
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.holidays_by_month
|
14
|
+
{
|
15
|
+
0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "დიდი პარასკევი", :regions => [:ge]},
|
16
|
+
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "დიდი შაბათი", :regions => [:ge]},
|
17
|
+
{:function => "orthodox_easter(year)", :function_arguments => [:year], :name => "ბრწყინვალე აღდგომის დღე", :regions => [:ge]},
|
18
|
+
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "მიცვალებულთა", :regions => [:ge]}],
|
19
|
+
1 => [{:mday => 1, :name => "ახალი წელი", :regions => [:ge]},
|
20
|
+
{:mday => 2, :name => "ბედობა", :regions => [:ge]},
|
21
|
+
{:mday => 7, :name => "ქრისტეშობა", :regions => [:ge]},
|
22
|
+
{:mday => 19, :name => "ნათლისღება", :regions => [:ge]}],
|
23
|
+
3 => [{:mday => 3, :name => "დედის დღე", :regions => [:ge]},
|
24
|
+
{:mday => 8, :name => "ქალთა საერთაშორისო დღე", :regions => [:ge]}],
|
25
|
+
4 => [{:mday => 9, :name => "ეროვნული ერთიანობის დღე", :regions => [:ge]}],
|
26
|
+
5 => [{:mday => 9, :name => "ფაშიზმზე გამარჯვების დღე", :regions => [:ge]},
|
27
|
+
{:mday => 12, :name => "წმინდა მოციქულის ანდრია პირველწოდებულის საქართველოში შემოსვლის დღე", :regions => [:ge]},
|
28
|
+
{:mday => 26, :name => "დამოუკიდებლობის დღე", :regions => [:ge]}],
|
29
|
+
8 => [{:mday => 28, :name => "მარიამობა", :regions => [:ge]}],
|
30
|
+
10 => [{:mday => 14, :name => "სვეტიცხოვლობა", :regions => [:ge]}],
|
31
|
+
11 => [{:mday => 23, :name => "გიორგობა", :regions => [:ge]}]
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.custom_methods
|
36
|
+
{
|
37
|
+
|
38
|
+
}
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Holidays
|
3
|
+
# This file is generated by the Ruby Holidays gem.
|
4
|
+
#
|
5
|
+
# Definitions loaded: definitions/mt_en.yaml
|
6
|
+
#
|
7
|
+
# All the definitions are available at https://github.com/holidays/holidays
|
8
|
+
module MT_EN # :nodoc:
|
9
|
+
def self.defined_regions
|
10
|
+
[:mt_en]
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.holidays_by_month
|
14
|
+
{
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:mt_en]}],
|
16
|
+
1 => [{:mday => 1, :name => "New Year's Day", :regions => [:mt_en]}],
|
17
|
+
2 => [{:mday => 10, :name => "Feast of Saint Paul's Shipwreck in Malta", :regions => [:mt_en]}],
|
18
|
+
3 => [{:mday => 19, :name => "Feast of Saint Joseph", :regions => [:mt_en]},
|
19
|
+
{:mday => 31, :name => "Freedom Day", :regions => [:mt_en]}],
|
20
|
+
5 => [{:mday => 1, :name => "Worker's Day", :regions => [:mt_en]}],
|
21
|
+
6 => [{:mday => 7, :name => "Sette Giugno", :regions => [:mt_en]},
|
22
|
+
{:mday => 29, :name => "Feast of Saint Peter & Saint Paul", :regions => [:mt_en]}],
|
23
|
+
8 => [{:mday => 15, :name => "Feast of the Assumption of Our Lady", :regions => [:mt_en]}],
|
24
|
+
9 => [{:mday => 8, :name => "Victory Day", :regions => [:mt_en]},
|
25
|
+
{:mday => 21, :name => "Independence Day", :regions => [:mt_en]}],
|
26
|
+
12 => [{:mday => 8, :name => "Feast of the Immaculate Conception", :regions => [:mt_en]},
|
27
|
+
{:mday => 13, :name => "Republic Day", :regions => [:mt_en]},
|
28
|
+
{:mday => 25, :name => "Christmas Day", :regions => [:mt_en]}]
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.custom_methods
|
33
|
+
{
|
34
|
+
|
35
|
+
}
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Holidays
|
3
|
+
# This file is generated by the Ruby Holidays gem.
|
4
|
+
#
|
5
|
+
# Definitions loaded: definitions/mt_mt.yaml
|
6
|
+
#
|
7
|
+
# All the definitions are available at https://github.com/holidays/holidays
|
8
|
+
module MT_MT # :nodoc:
|
9
|
+
def self.defined_regions
|
10
|
+
[:mt_mt]
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.holidays_by_month
|
14
|
+
{
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Il-Ġimgħa l-Kbira", :regions => [:mt_mt]}],
|
16
|
+
1 => [{:mday => 1, :name => "L-Ewwel tas-Sena", :regions => [:mt_mt]}],
|
17
|
+
2 => [{:mday => 10, :name => "Nawfraġju ta' San Pawl", :regions => [:mt_mt]}],
|
18
|
+
3 => [{:mday => 19, :name => "San Ġużepp", :regions => [:mt_mt]},
|
19
|
+
{:mday => 31, :name => "Jum il-Ħelsien", :regions => [:mt_mt]}],
|
20
|
+
5 => [{:mday => 1, :name => "Jum il-Ħaddiem", :regions => [:mt_mt]}],
|
21
|
+
6 => [{:mday => 7, :name => "Sette Giugno", :regions => [:mt_mt]},
|
22
|
+
{:mday => 29, :name => "L-Imnarja", :regions => [:mt_mt]}],
|
23
|
+
8 => [{:mday => 15, :name => "Santa Marija", :regions => [:mt_mt]}],
|
24
|
+
9 => [{:mday => 8, :name => "Jum il-Vitorja", :regions => [:mt_mt]},
|
25
|
+
{:mday => 21, :name => "Jum l-Indipendenza", :regions => [:mt_mt]}],
|
26
|
+
12 => [{:mday => 8, :name => "Il-Kunċizzjoni", :regions => [:mt_mt]},
|
27
|
+
{:mday => 13, :name => "Jum ir-Repubblika", :regions => [:mt_mt]},
|
28
|
+
{:mday => 25, :name => "Il-Milied", :regions => [:mt_mt]}]
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.custom_methods
|
33
|
+
{
|
34
|
+
|
35
|
+
}
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -7,7 +7,7 @@ module Holidays
|
|
7
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
8
8
|
module NORTH_AMERICA # :nodoc:
|
9
9
|
def self.defined_regions
|
10
|
-
[:ca, :ca_qc, :ca_ab, :ca_sk, :ca_on, :ca_bc, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_yt, :ca_nb, :mx, :mx_pue, :us, :us_dc, :us_ca]
|
10
|
+
[:ca, :ca_qc, :ca_ab, :ca_sk, :ca_on, :ca_bc, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_yt, :ca_nb, :mx, :mx_pue, :us_fl, :us_la, :us, :us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn, :us_ms, :us_id, :us_ar, :us_tx, :us_dc, :us_md, :us_va, :us_il, :us_vt, :us_ak, :us_ca, :us_me, :us_ma, :us_al, :us_ga, :us_ne, :us_mo, :us_sc, :us_wv, :us_vi, :us_ut, :us_ri, :us_az, :us_co, :us_mt, :us_nm, :us_ny, :us_oh, :us_pa, :us_mi, :us_mn, :us_nv, :us_or, :us_sd, :us_wa, :us_wi, :us_wy, :us_ia, :us_ks, :us_nh, :us_ok]
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
@@ -15,15 +15,23 @@ module Holidays
|
|
15
15
|
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:ca]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Easter Sunday", :regions => [:ca]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :type => :informal, :name => "Easter Monday", :regions => [:ca]},
|
18
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Shrove Tuesday", :regions => [:us_fl]},
|
19
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Mardi Gras Day", :regions => [:us_la]},
|
18
20
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :type => :informal, :name => "Good Friday", :regions => [:us]},
|
21
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_la, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn]},
|
19
22
|
{:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Easter Sunday", :regions => [:us]}],
|
20
23
|
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:ca]},
|
21
24
|
{:mday => 2, :name => "New Year's", :regions => [:ca_qc]},
|
22
25
|
{:mday => 1, :name => "Año nuevo", :regions => [:mx]},
|
23
26
|
{:mday => 6, :name => "Dia de los Santos Reyes", :regions => [:mx]},
|
24
27
|
{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:us]},
|
28
|
+
{:wday => 1, :week => 3, :name => "Martin Luther King's and Robert E. Lee's Birthdays", :regions => [:us_ms]},
|
29
|
+
{:wday => 1, :week => 3, :name => "Idaho Human Rights Day", :regions => [:us_id]},
|
30
|
+
{:wday => 1, :week => 3, :name => "Civil Rights Day", :regions => [:us_ar]},
|
25
31
|
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:us]},
|
26
|
-
{:function => "us_inauguration_day(year)", :function_arguments => [:year], :name => "Inauguration Day", :regions => [:us_dc]}
|
32
|
+
{:function => "us_inauguration_day(year)", :function_arguments => [:year], :name => "Inauguration Day", :regions => [:us_tx, :us_dc, :us_la, :us_md, :us_va]},
|
33
|
+
{:function => "lee_jackson_day(year, month)", :function_arguments => [:year, :month], :name => "Lee-Jackson Day", :regions => [:us_va]},
|
34
|
+
{:mday => 19, :name => "Confederate Heroes Day", :regions => [:us_tx]}],
|
27
35
|
2 => [{:wday => 1, :week => 3, :year_ranges => [{:after => 1990}],:name => "Family Day", :regions => [:ca_ab]},
|
28
36
|
{:wday => 1, :week => 3, :year_ranges => [{:after => 2007}],:name => "Family Day", :regions => [:ca_sk]},
|
29
37
|
{:wday => 1, :week => 3, :year_ranges => [{:after => 2008}],:name => "Family Day", :regions => [:ca_on]},
|
@@ -37,7 +45,12 @@ module Holidays
|
|
37
45
|
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
38
46
|
3 => [{:mday => 23, :name => "St. George's Day", :regions => [:ca_nl]},
|
39
47
|
{:wday => 1, :week => 3, :name => "Natalicio de Benito Juárez", :regions => [:mx]},
|
40
|
-
{:
|
48
|
+
{:wday => 1, :week => 1, :name => "Casimir Pulaski Day", :regions => [:us_il]},
|
49
|
+
{:wday => 2, :week => 1, :name => "Town Meeting Day", :regions => [:us_vt]},
|
50
|
+
{:mday => 2, :name => "Texas Independence Day", :regions => [:us_tx]},
|
51
|
+
{:mday => 26, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Prince Jonah Kuhio Kalanianaole Day", :regions => [:us_hi]},
|
52
|
+
{:wday => 1, :week => -1, :name => "Seward's Day", :regions => [:us_ak]},
|
53
|
+
{:mday => 31, :name => "César Chávez Day", :regions => [:us_ca]},
|
41
54
|
{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:us, :ca]}],
|
42
55
|
5 => [{:function => "ca_victoria_day(year)", :function_arguments => [:year], :name => "Victoria Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nt, :ca_nu, :ca_on, :ca_sk, :ca_yt]},
|
43
56
|
{:function => "ca_victoria_day(year)", :function_arguments => [:year], :name => "National Patriotes Day", :regions => [:ca_qc]},
|
@@ -46,6 +59,8 @@ module Holidays
|
|
46
59
|
{:mday => 5, :name => "La Batalla de Puebla", :regions => [:mx_pue]},
|
47
60
|
{:mday => 10, :type => :informal, :name => "Día de la Madre", :regions => [:mx]},
|
48
61
|
{:mday => 15, :type => :informal, :name => "Día del Maestro", :regions => [:mx]},
|
62
|
+
{:mday => 8, :name => "Truman Day", :regions => [:us_mo]},
|
63
|
+
{:mday => 10, :name => "Confederate Memorial Day", :regions => [:us_sc]},
|
49
64
|
{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:us]},
|
50
65
|
{:wday => 0, :week => 2, :type => :informal, :name => "Mother's Day", :regions => [:us, :ca]},
|
51
66
|
{:wday => 6, :week => 3, :type => :informal, :name => "Armed Forces Day", :regions => [:us]}],
|
@@ -53,11 +68,19 @@ module Holidays
|
|
53
68
|
{:mday => 24, :name => "Fête Nationale", :regions => [:ca_qc]},
|
54
69
|
{:mday => 21, :name => "National Aboriginal Day", :regions => [:ca_nt]},
|
55
70
|
{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:mx]},
|
71
|
+
{:wday => 1, :week => 1, :name => "Jefferson Davis' Birthday", :regions => [:us_al]},
|
72
|
+
{:mday => 3, :name => "Birthday of Jefferson Davis", :regions => [:us_fl]},
|
73
|
+
{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "King Kamehameha I Day", :regions => [:us_hi]},
|
74
|
+
{:mday => 19, :name => "Emancipation Day in Texas", :regions => [:us_tx]},
|
75
|
+
{:mday => 20, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "West Virginia Day", :regions => [:us_wv]},
|
56
76
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
57
77
|
7 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Canada Day", :regions => [:ca]},
|
58
78
|
{:mday => 12, :name => "Orangemen's Day", :regions => [:ca_nl]},
|
59
79
|
{:mday => 9, :name => "Nunavut Day", :regions => [:ca_nu]},
|
60
|
-
{:mday =>
|
80
|
+
{:mday => 3, :name => "Emancipation Day", :regions => [:us_vi]},
|
81
|
+
{:mday => 4, :name => "Independence Day", :regions => [:us]},
|
82
|
+
{:mday => 4, :function => "to_weekday_if_weekend(date)", :function_arguments => [:date], :name => "Independence Day (Holiday)", :regions => [:us_va]},
|
83
|
+
{:mday => 24, :name => "Pioneer Day", :regions => [:us_ut]}],
|
61
84
|
8 => [{:wday => 1, :week => 1, :name => "B.C. Day", :regions => [:ca_bc]},
|
62
85
|
{:wday => 1, :week => 1, :name => "Saskatchewan Day", :regions => [:ca_sk]},
|
63
86
|
{:wday => 1, :week => 1, :name => "Heritage Day", :regions => [:ca_ab]},
|
@@ -65,22 +88,37 @@ module Holidays
|
|
65
88
|
{:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_nt, :ca_nu, :ca_pe]},
|
66
89
|
{:wday => 1, :week => 1, :type => :informal, :name => "Civic Holiday", :regions => [:ca_on]},
|
67
90
|
{:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
|
68
|
-
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]}
|
91
|
+
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]},
|
92
|
+
{:wday => 1, :week => 2, :name => "Victory Day", :regions => [:us_ri]},
|
93
|
+
{:mday => 16, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Bennington Battle Day", :regions => [:us_vt]},
|
94
|
+
{:wday => 5, :week => 3, :name => "Statehood Day", :regions => [:us_hi]},
|
95
|
+
{:mday => 27, :name => "Lyndon Baines Johnson Day", :regions => [:us_tx]}],
|
69
96
|
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
|
70
97
|
{:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
|
71
98
|
{:mday => 16, :name => "Día de la Independencia", :regions => [:mx]},
|
72
|
-
{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]}
|
99
|
+
{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]},
|
100
|
+
{:function => "rosh_hashanah(year)", :function_arguments => [:year], :name => "Rosh Hashanah", :regions => [:us_tx]},
|
101
|
+
{:function => "yom_kippur(year)", :function_arguments => [:year], :name => "Yom Kippur", :regions => [:us_tx]}],
|
73
102
|
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nt, :ca_nu, :ca_on, :ca_sk, :ca_yt]},
|
74
103
|
{:mday => 12, :type => :informal, :name => "Día de la Raza", :regions => [:mx]},
|
75
|
-
{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:
|
104
|
+
{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:us_al, :us_az, :us_co, :us_ct, :us_dc, :us_ga, :us_id, :us_il, :us_in, :us_ma, :us_md, :us_me, :us_mo, :us_mt, :us_ne, :us_nj, :us_nm, :us_ny, :us_oh, :us_pa, :us_ri, :us_ut, :us_va, :us_wv]},
|
105
|
+
{:wday => 1, :week => 2, :type => :informal, :name => "Columbus Day", :regions => [:us_ak, :us_ar, :us_ca, :us_de, :us_fl, :us_hi, :us_mi, :us_mn, :us_nd, :us_nv, :us_or, :us_sd, :us_tx, :us_vt, :us_wa, :us_wi, :us_wy]},
|
106
|
+
{:mday => 18, :name => "Alaska Day", :regions => [:us_ak]},
|
107
|
+
{:wday => 5, :week => -1, :name => "Nevada Day", :regions => [:us_nv]},
|
76
108
|
{:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
|
77
109
|
11 => [{:mday => 11, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Remembrance Day", :regions => [:ca_ab, :ca_sk, :ca_bc, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_nb, :ca_yt]},
|
78
110
|
{:mday => 1, :type => :informal, :name => "Todos los Santos", :regions => [:mx]},
|
79
111
|
{:mday => 2, :type => :informal, :name => "Los Fieles Difuntos", :regions => [:mx]},
|
80
112
|
{:wday => 1, :week => 3, :name => "Día de la Revolución", :regions => [:mx]},
|
113
|
+
{:function => "election_day(year)", :function_arguments => [:year], :name => "Election Day", :regions => [:us_de, :us_hi, :us_il, :us_in, :us_mt, :us_nj, :us_ny, :us_pa, :us_ri]},
|
81
114
|
{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Veterans Day", :regions => [:us]},
|
82
115
|
{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:us]},
|
83
|
-
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Day
|
116
|
+
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Family Day", :regions => [:us_nv]},
|
117
|
+
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "State Holiday", :regions => [:us_ga]},
|
118
|
+
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Presidents' Day", :regions => [:us_nm]},
|
119
|
+
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Lincoln's Birthday", :regions => [:us_in]},
|
120
|
+
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "American Indian Heritage Day", :regions => [:us_md]},
|
121
|
+
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Day after Thanksgiving (Black Friday)", :regions => [:us_ca, :us_de, :us_fl, :us_ia, :us_il, :us_ks, :us_ky, :us_me, :us_mi, :us_mn, :us_ms, :us_ne, :us_nh, :us_nc, :us_pa, :us_sc, :us_ok, :us_tn, :us_tx, :us_va, :us_wa, :us_wv]}],
|
84
122
|
12 => [{:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca]},
|
85
123
|
{:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
|
86
124
|
{:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "Boxing Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_sk, :ca_yt]},
|
@@ -88,8 +126,19 @@ module Holidays
|
|
88
126
|
{:mday => 24, :type => :informal, :name => "Nochebuena", :regions => [:mx]},
|
89
127
|
{:mday => 25, :name => "Navidad", :regions => [:mx]},
|
90
128
|
{:mday => 28, :name => "Los Santos Inocentes", :regions => [:mx]},
|
91
|
-
{:mday =>
|
129
|
+
{:mday => 24, :name => "Christmas Eve", :regions => [:us_ar, :us_mi, :us_nc, :us_sc, :us_tx, :us_wi]},
|
130
|
+
{:mday => 24, :function => "christmas_eve_holiday(date)", :function_arguments => [:date], :name => "Christmas Eve (Holiday)", :regions => [:us_mi, :us_sc, :us_va]},
|
131
|
+
{:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:us]},
|
132
|
+
{:mday => 26, :name => "Day after Christmas", :regions => [:us_ar, :us_nc, :us_ok, :us_sc, :us_tn, :us_tx]},
|
133
|
+
{:mday => 31, :name => "New Year's Eve", :regions => [:us_mi, :us_wi]}],
|
92
134
|
4 => [{:mday => 30, :type => :informal, :name => "Día del Niño", :regions => [:mx]},
|
135
|
+
{:mday => 16, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Emancipation Day", :regions => [:us_dc, :us_ca]},
|
136
|
+
{:wday => 1, :week => 3, :name => "Patriots' Day", :regions => [:us_me, :us_ma]},
|
137
|
+
{:mday => 21, :name => "San Jacinto Day", :regions => [:us_tx]},
|
138
|
+
{:wday => 1, :week => -1, :name => "Confederate Memorial Day", :regions => [:us_al, :us_ms]},
|
139
|
+
{:mday => 26, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Confederate Memorial Day", :regions => [:us_fl]},
|
140
|
+
{:function => "georgia_state_holiday(year, month)", :function_arguments => [:year, :month], :name => "State Holiday", :regions => [:us_ga]},
|
141
|
+
{:mday => 28, :name => "Arbor Day", :regions => [:us_ne]},
|
93
142
|
{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
|
94
143
|
{:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}]
|
95
144
|
}
|
@@ -107,6 +156,54 @@ end
|
|
107
156
|
date
|
108
157
|
},
|
109
158
|
|
159
|
+
"christmas_eve_holiday(date)" => Proc.new { |date|
|
160
|
+
beginning_of_month = Date.civil(date.year, date.month, 1)
|
161
|
+
(date.saturday? || date.sunday?) ? date.downto(beginning_of_month).find {|date| date if date.wday == 5} : date
|
162
|
+
},
|
163
|
+
|
164
|
+
"rosh_hashanah(year)" => Proc.new { |year|
|
165
|
+
rosh_hashanah_dates = {
|
166
|
+
'2014' => Date.civil(2014, 9, 25),
|
167
|
+
'2015' => Date.civil(2015, 9, 14),
|
168
|
+
'2016' => Date.civil(2016, 10, 3),
|
169
|
+
'2017' => Date.civil(2017, 9, 21),
|
170
|
+
'2018' => Date.civil(2018, 9, 10),
|
171
|
+
'2019' => Date.civil(2019, 9, 30),
|
172
|
+
'2020' => Date.civil(2020, 9, 19)
|
173
|
+
}
|
174
|
+
rosh_hashanah_dates[year.to_s]
|
175
|
+
},
|
176
|
+
|
177
|
+
"yom_kippur(year)" => Proc.new { |year|
|
178
|
+
yom_kippur_dates = {
|
179
|
+
'2014' => Date.civil(2014, 10, 4),
|
180
|
+
'2015' => Date.civil(2015, 9, 23),
|
181
|
+
'2016' => Date.civil(2016, 10, 12),
|
182
|
+
'2017' => Date.civil(2017, 9, 30),
|
183
|
+
'2018' => Date.civil(2018, 9, 19),
|
184
|
+
'2019' => Date.civil(2019, 10, 9),
|
185
|
+
'2020' => Date.civil(2020, 9, 28)
|
186
|
+
}
|
187
|
+
yom_kippur_dates[year.to_s]
|
188
|
+
},
|
189
|
+
|
190
|
+
"georgia_state_holiday(year, month)" => Proc.new { |year, month|
|
191
|
+
beginning_of_month = Date.civil(year, month, 1)
|
192
|
+
state_holiday = Date.civil(year, month, 26)
|
193
|
+
state_holiday.downto(beginning_of_month).find {|date| date if date.wday == 1 }
|
194
|
+
},
|
195
|
+
|
196
|
+
"lee_jackson_day(year, month)" => Proc.new { |year, month|
|
197
|
+
day_of_holiday = Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, month, 3, 1)
|
198
|
+
beginning_of_month = Date.civil(year, month, 1)
|
199
|
+
king_day = Date.civil(year, month, day_of_holiday)
|
200
|
+
king_day.downto(beginning_of_month).find {|date| date if date.wday == 5 }
|
201
|
+
},
|
202
|
+
|
203
|
+
"election_day(year)" => Proc.new { |year|
|
204
|
+
Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 11, 1, 1) + 1
|
205
|
+
},
|
206
|
+
|
110
207
|
"us_inauguration_day(year)" => Proc.new { |year|
|
111
208
|
year % 4 == 1 ? 20 : nil
|
112
209
|
},
|