holidays 6.6.1 → 8.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +25 -0
- data/CHANGELOG.md +72 -0
- data/README.md +10 -6
- data/doc/CONTRIBUTING.md +2 -1
- data/holidays.gemspec +5 -5
- data/lib/generated_definitions/MANIFEST +11 -5
- data/lib/generated_definitions/REGIONS.rb +2 -2
- data/lib/generated_definitions/ar.rb +28 -9
- data/lib/generated_definitions/at.rb +2 -2
- data/lib/generated_definitions/au.rb +47 -10
- data/lib/generated_definitions/be_fr.rb +2 -2
- data/lib/generated_definitions/be_nl.rb +2 -2
- data/lib/generated_definitions/bg.rb +2 -2
- data/lib/generated_definitions/br.rb +2 -2
- data/lib/generated_definitions/ca.rb +25 -17
- data/lib/generated_definitions/ch.rb +15 -3
- data/lib/generated_definitions/cl.rb +7 -7
- data/lib/generated_definitions/co.rb +2 -2
- data/lib/generated_definitions/cr.rb +2 -2
- data/lib/generated_definitions/cz.rb +2 -2
- data/lib/generated_definitions/de.rb +11 -7
- data/lib/generated_definitions/dk.rb +3 -3
- data/lib/generated_definitions/{ecb_target.rb → ecbtarget.rb} +10 -10
- data/lib/generated_definitions/ee.rb +2 -2
- data/lib/generated_definitions/el.rb +2 -2
- data/lib/generated_definitions/es.rb +6 -4
- data/lib/generated_definitions/europe.rb +119 -32
- data/lib/generated_definitions/{federal_reserve.rb → federalreserve.rb} +15 -14
- data/lib/generated_definitions/federalreservebanks.rb +35 -0
- data/lib/generated_definitions/fedex.rb +2 -2
- data/lib/generated_definitions/fi.rb +2 -2
- data/lib/generated_definitions/fr.rb +4 -4
- data/lib/generated_definitions/gb.rb +15 -7
- data/lib/generated_definitions/ge.rb +2 -2
- data/lib/generated_definitions/hk.rb +2 -2
- data/lib/generated_definitions/hr.rb +10 -8
- data/lib/generated_definitions/hu.rb +4 -3
- data/lib/generated_definitions/ie.rb +2 -2
- data/lib/generated_definitions/is.rb +2 -2
- data/lib/generated_definitions/it.rb +16 -7
- data/lib/generated_definitions/jp.rb +31 -16
- data/lib/generated_definitions/kr.rb +2 -2
- data/lib/generated_definitions/kz.rb +38 -0
- data/lib/generated_definitions/li.rb +2 -2
- data/lib/generated_definitions/lt.rb +2 -2
- data/lib/generated_definitions/lu.rb +4 -2
- data/lib/generated_definitions/lv.rb +56 -0
- data/lib/generated_definitions/ma.rb +2 -2
- data/lib/generated_definitions/mt_en.rb +2 -2
- data/lib/generated_definitions/mt_mt.rb +2 -2
- data/lib/generated_definitions/mx.rb +7 -7
- data/lib/generated_definitions/my.rb +2 -2
- data/lib/generated_definitions/nerc.rb +2 -2
- data/lib/generated_definitions/ng.rb +33 -0
- data/lib/generated_definitions/nl.rb +2 -2
- data/lib/generated_definitions/no.rb +2 -2
- data/lib/generated_definitions/{north_america.rb → northamerica.rb} +34 -26
- data/lib/generated_definitions/nyse.rb +3 -2
- data/lib/generated_definitions/nz.rb +41 -3
- data/lib/generated_definitions/pe.rb +2 -2
- data/lib/generated_definitions/ph.rb +2 -2
- data/lib/generated_definitions/pl.rb +2 -2
- data/lib/generated_definitions/pt.rb +2 -2
- data/lib/generated_definitions/ro.rb +6 -3
- data/lib/generated_definitions/rs_cyrl.rb +3 -3
- data/lib/generated_definitions/rs_la.rb +3 -3
- data/lib/generated_definitions/ru.rb +2 -2
- data/lib/generated_definitions/scandinavia.rb +3 -3
- data/lib/generated_definitions/se.rb +2 -2
- data/lib/generated_definitions/sg.rb +2 -2
- data/lib/generated_definitions/si.rb +4 -3
- data/lib/generated_definitions/sk.rb +2 -2
- data/lib/generated_definitions/{south_america.rb → southamerica.rb} +32 -13
- data/lib/generated_definitions/th.rb +36 -0
- data/lib/generated_definitions/tn.rb +2 -2
- data/lib/generated_definitions/tr.rb +7 -5
- data/lib/generated_definitions/ua.rb +37 -0
- data/lib/generated_definitions/{united_nations.rb → unitednations.rb} +61 -61
- data/lib/generated_definitions/ups.rb +2 -2
- data/lib/generated_definitions/us.rb +9 -9
- data/lib/generated_definitions/ve.rb +2 -2
- data/lib/generated_definitions/vi.rb +2 -2
- data/lib/generated_definitions/za.rb +3 -3
- data/lib/holidays/definition/context/generator.rb +23 -70
- data/lib/holidays/definition/generator/module.rb +54 -0
- data/lib/holidays/definition/generator/regions.rb +1 -1
- data/lib/holidays/definition/repository/holidays_by_month.rb +9 -1
- data/lib/holidays/factory/definition.rb +7 -0
- data/lib/holidays/finder/context/search.rb +35 -31
- data/lib/holidays/finder/rules/year_range.rb +30 -54
- data/lib/holidays/version.rb +1 -1
- data/lib/holidays.rb +2 -0
- data/test/coverage_report.rb +23 -5
- data/test/data/test_custom_year_range_holiday_defs.yaml +6 -10
- data/test/data/test_multiple_regions_with_conflicts_region_1.yaml +38 -0
- data/test/data/test_multiple_regions_with_conflicts_region_2.yaml +38 -0
- data/test/defs/test_defs_ar.rb +20 -4
- data/test/defs/test_defs_au.rb +22 -0
- data/test/defs/test_defs_ca.rb +71 -8
- data/test/defs/test_defs_ch.rb +4 -0
- data/test/defs/test_defs_co.rb +3 -3
- data/test/defs/test_defs_de.rb +8 -0
- data/test/defs/test_defs_dk.rb +4 -0
- data/test/defs/{test_defs_ecb_target.rb → test_defs_ecbtarget.rb} +11 -11
- data/test/defs/test_defs_es.rb +2 -0
- data/test/defs/test_defs_europe.rb +233 -14
- data/test/defs/test_defs_federalreserve.rb +119 -0
- data/test/defs/test_defs_federalreservebanks.rb +251 -0
- data/test/defs/test_defs_fr.rb +3 -3
- data/test/defs/test_defs_gb.rb +42 -0
- data/test/defs/test_defs_hr.rb +6 -6
- data/test/defs/test_defs_hu.rb +12 -4
- data/test/defs/test_defs_it.rb +20 -0
- data/test/defs/test_defs_jp.rb +22 -2
- data/test/defs/test_defs_kz.rb +39 -0
- data/test/defs/test_defs_lu.rb +6 -0
- data/test/defs/test_defs_lv.rb +98 -0
- data/test/defs/test_defs_mx.rb +3 -1
- data/test/defs/test_defs_ng.rb +29 -0
- data/test/defs/{test_defs_north_america.rb → test_defs_northamerica.rb} +85 -20
- data/test/defs/test_defs_nyse.rb +7 -0
- data/test/defs/test_defs_nz.rb +4 -0
- data/test/defs/test_defs_ro.rb +14 -0
- data/test/defs/test_defs_rs_cyrl.rb +1 -1
- data/test/defs/test_defs_rs_la.rb +1 -1
- data/test/defs/test_defs_scandinavia.rb +4 -0
- data/test/defs/{test_defs_south_america.rb → test_defs_southamerica.rb} +25 -9
- data/test/defs/test_defs_th.rb +33 -0
- data/test/defs/test_defs_tr.rb +7 -0
- data/test/defs/test_defs_ua.rb +41 -0
- data/test/defs/{test_defs_united_nations.rb → test_defs_unitednations.rb} +3 -3
- data/test/defs/test_defs_us.rb +11 -11
- data/test/holidays/core_extensions/test_date.rb +3 -2
- data/test/holidays/definition/context/test_generator.rb +17 -20
- data/test/holidays/definition/generator/test_module.rb +268 -0
- data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
- data/test/holidays/finder/rules/test_year_range.rb +43 -47
- data/test/integration/test_available_regions.rb +1 -1
- data/test/integration/test_custom_year_range_holidays.rb +0 -7
- data/test/integration/test_holidays.rb +2 -36
- data/test/integration/test_holidays_between.rb +11 -1
- data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
- data/test/integration/test_nonstandard_regions.rb +25 -0
- metadata +61 -32
- data/test/defs/test_defs_federal_reserve.rb +0 -113
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
1 => [{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:my]}],
|
16
16
|
5 => [{:mday => 1, :name => "Labour Day", :regions => [:my]}],
|
17
17
|
6 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Agong's Birthday", :regions => [:my]}],
|
18
18
|
8 => [{:mday => 31, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:my]}],
|
@@ -23,7 +23,7 @@ module Holidays
|
|
23
23
|
|
24
24
|
def self.custom_methods
|
25
25
|
{
|
26
|
-
|
26
|
+
|
27
27
|
}
|
28
28
|
end
|
29
29
|
end
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:nerc]}],
|
16
16
|
5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:nerc]}],
|
17
17
|
7 => [{:mday => 4, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:nerc]}],
|
18
18
|
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:nerc]}],
|
@@ -23,7 +23,7 @@ module Holidays
|
|
23
23
|
|
24
24
|
def self.custom_methods
|
25
25
|
{
|
26
|
-
|
26
|
+
|
27
27
|
}
|
28
28
|
end
|
29
29
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Holidays
|
3
|
+
# This file is generated by the Ruby Holidays gem.
|
4
|
+
#
|
5
|
+
# Definitions loaded: definitions/ng.yaml
|
6
|
+
#
|
7
|
+
# All the definitions are available at https://github.com/holidays/holidays
|
8
|
+
module NG # :nodoc:
|
9
|
+
def self.defined_regions
|
10
|
+
[:ng]
|
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 => [:ng]},
|
16
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:ng]}],
|
17
|
+
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:ng]}],
|
18
|
+
5 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Workers' Day", :regions => [:ng]},
|
19
|
+
{:mday => 27, :type => :informal, :name => "Children's Day", :regions => [:ng]}],
|
20
|
+
6 => [{:mday => 12, :year_ranges => { :from => 2018 },:name => "Democracy Day", :regions => [:ng]}],
|
21
|
+
10 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:ng]}],
|
22
|
+
12 => [{:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ng]},
|
23
|
+
{:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ng]}]
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.custom_methods
|
28
|
+
{
|
29
|
+
|
30
|
+
}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :type => :informal, :name => "Goede Vrijdag", :regions => [:nl]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Eerste Paasdag", :regions => [:nl]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Tweede Paasdag", :regions => [:nl]},
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Hemelvaartsdag", :regions => [:nl]},
|
@@ -30,7 +30,7 @@ module Holidays
|
|
30
30
|
|
31
31
|
def self.custom_methods
|
32
32
|
{
|
33
|
-
|
33
|
+
|
34
34
|
}
|
35
35
|
end
|
36
36
|
end
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -49, :type => :informal, :name => "Fastelavn", :regions => [:no]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -7, :name => "Palmesøndag", :regions => [:no]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Skjærtorsdag", :regions => [:no]},
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Langfredag", :regions => [:no]},
|
@@ -33,7 +33,7 @@ module Holidays
|
|
33
33
|
|
34
34
|
def self.custom_methods
|
35
35
|
{
|
36
|
-
|
36
|
+
|
37
37
|
}
|
38
38
|
end
|
39
39
|
end
|
@@ -2,17 +2,17 @@
|
|
2
2
|
module Holidays
|
3
3
|
# This file is generated by the Ruby Holidays gem.
|
4
4
|
#
|
5
|
-
# Definitions loaded: definitions/ca.yaml, definitions/mx.yaml, definitions/us.yaml, definitions/
|
5
|
+
# Definitions loaded: definitions/ca.yaml, definitions/mx.yaml, definitions/us.yaml, definitions/northamericainformal.yaml
|
6
6
|
#
|
7
7
|
# All the definitions are available at https://github.com/holidays/holidays
|
8
|
-
module
|
8
|
+
module NORTHAMERICA # :nodoc:
|
9
9
|
def self.defined_regions
|
10
|
-
[:ca, :ca_qc, :ca_ab, :ca_sk, :ca_on, :ca_bc, :ca_nb, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_yt, :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, :
|
10
|
+
[:ca, :ca_qc, :ca_ab, :ca_sk, :ca_on, :ca_bc, :ca_nb, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_yt, :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_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_il, :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
|
14
14
|
{
|
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
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Shrove Tuesday", :regions => [:us_fl]},
|
@@ -23,7 +23,7 @@ module Holidays
|
|
23
23
|
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:ca]},
|
24
24
|
{:mday => 2, :name => "New Year's", :regions => [:ca_qc]},
|
25
25
|
{:mday => 1, :name => "Año nuevo", :regions => [:mx]},
|
26
|
-
{:mday => 6, :name => "Dia de los Santos Reyes", :regions => [:mx]},
|
26
|
+
{:mday => 6, :type => :informal, :name => "Dia de los Santos Reyes", :regions => [:mx]},
|
27
27
|
{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:us]},
|
28
28
|
{:wday => 1, :week => 3, :name => "Martin Luther King's and Robert E. Lee's Birthdays", :regions => [:us_ms]},
|
29
29
|
{:wday => 1, :week => 3, :name => "Idaho Human Rights Day", :regions => [:us_id]},
|
@@ -32,21 +32,22 @@ module Holidays
|
|
32
32
|
{:function => "us_inauguration_day(year)", :function_arguments => [:year], :name => "Inauguration Day", :regions => [:us_tx, :us_dc, :us_la, :us_md, :us_va]},
|
33
33
|
{:function => "lee_jackson_day(year, month)", :function_arguments => [:year, :month], :name => "Lee-Jackson Day", :regions => [:us_va]},
|
34
34
|
{:mday => 19, :name => "Confederate Heroes Day", :regions => [:us_tx]}],
|
35
|
-
2 => [{:wday => 1, :week => 3,
|
36
|
-
{:wday => 1, :week => 3,
|
37
|
-
{:wday => 1, :week => 3,
|
38
|
-
{:wday => 1, :week => 2,
|
39
|
-
{:wday => 1, :week => 3,
|
35
|
+
2 => [{:wday => 1, :week => 3, :year_ranges => { :from => 1990 },:name => "Family Day", :regions => [:ca_ab]},
|
36
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2007 },:name => "Family Day", :regions => [:ca_sk]},
|
37
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2008 },:name => "Family Day", :regions => [:ca_on]},
|
38
|
+
{:wday => 1, :week => 2, :year_ranges => { :between => 2013..2018 },:name => "Family Day", :regions => [:ca_bc]},
|
39
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2019 },:name => "Family Day", :regions => [:ca_bc]},
|
40
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2018 },:name => "Family Day", :regions => [:ca_nb]},
|
40
41
|
{:wday => 1, :week => 3, :name => "Louis Riel Day", :regions => [:ca_mb]},
|
41
|
-
{:wday => 1, :week => 3,
|
42
|
+
{:wday => 1, :week => 3, :year_ranges => { :from => 2015 },:name => "Nova Scotia Heritage Day", :regions => [:ca_ns]},
|
42
43
|
{:wday => 1, :week => 3, :name => "Islander Day", :regions => [:ca_pe]},
|
43
44
|
{:wday => 1, :week => 1, :name => "Día de la Constitución", :regions => [:mx]},
|
44
45
|
{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:us]},
|
45
46
|
{:mday => 2, :type => :informal, :name => "Groundhog Day", :regions => [:us, :ca]},
|
46
47
|
{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:us, :ca]}],
|
47
|
-
3 => [{:mday =>
|
48
|
+
3 => [{:mday => 17, :type => :informal, :name => "St. Patrick's Day", :regions => [:ca_nl]},
|
49
|
+
{:mday => 23, :type => :informal, :name => "St. George's Day", :regions => [:ca_nl]},
|
48
50
|
{:wday => 1, :week => 3, :name => "Natalicio de Benito Juárez", :regions => [:mx]},
|
49
|
-
{:wday => 1, :week => 1, :name => "Casimir Pulaski Day", :regions => [:us_il]},
|
50
51
|
{:wday => 2, :week => 1, :name => "Town Meeting Day", :regions => [:us_vt]},
|
51
52
|
{:mday => 2, :name => "Texas Independence Day", :regions => [:us_tx]},
|
52
53
|
{:mday => 26, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Prince Jonah Kuhio Kalanianaole Day", :regions => [:us_hi]},
|
@@ -57,7 +58,7 @@ module Holidays
|
|
57
58
|
{:function => "ca_victoria_day(year)", :function_arguments => [:year], :name => "National Patriotes Day", :regions => [:ca_qc]},
|
58
59
|
{:mday => 1, :name => "Día del Trabajo", :regions => [:mx]},
|
59
60
|
{:mday => 5, :type => :informal, :name => "Cinco de Mayo", :regions => [:mx]},
|
60
|
-
{:mday => 5, :name => "La Batalla de Puebla", :regions => [:mx_pue]},
|
61
|
+
{:mday => 5, :type => :informal, :name => "La Batalla de Puebla", :regions => [:mx_pue]},
|
61
62
|
{:mday => 10, :type => :informal, :name => "Día de la Madre", :regions => [:mx]},
|
62
63
|
{:mday => 15, :type => :informal, :name => "Día del Maestro", :regions => [:mx]},
|
63
64
|
{:mday => 8, :name => "Truman Day", :regions => [:us_mo]},
|
@@ -68,17 +69,18 @@ module Holidays
|
|
68
69
|
6 => [{:mday => 24, :type => :informal, :name => "Discovery Day", :regions => [:ca_nl]},
|
69
70
|
{:mday => 24, :name => "Fête Nationale", :regions => [:ca_qc]},
|
70
71
|
{:mday => 21, :name => "National Aboriginal Day", :regions => [:ca_nt]},
|
71
|
-
{:mday => 21,
|
72
|
+
{:mday => 21, :year_ranges => { :from => 2017 },:name => "National Aboriginal Day", :regions => [:ca_yt]},
|
72
73
|
{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:mx]},
|
73
74
|
{:wday => 1, :week => 1, :name => "Jefferson Davis' Birthday", :regions => [:us_al]},
|
74
75
|
{:mday => 3, :name => "Birthday of Jefferson Davis", :regions => [:us_fl]},
|
75
76
|
{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "King Kamehameha I Day", :regions => [:us_hi]},
|
77
|
+
{:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:us]},
|
76
78
|
{:mday => 19, :name => "Emancipation Day in Texas", :regions => [:us_tx]},
|
77
79
|
{:mday => 20, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "West Virginia Day", :regions => [:us_wv]},
|
78
80
|
{:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
|
79
81
|
7 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Canada Day", :regions => [:ca]},
|
80
82
|
{:mday => 12, :type => :informal, :name => "Orangemen's Day", :regions => [:ca_nl]},
|
81
|
-
{:mday => 9, :name => "Nunavut Day", :regions => [:ca_nu]},
|
83
|
+
{:mday => 9, :year_ranges => { :from => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Nunavut Day", :regions => [:ca_nu]},
|
82
84
|
{:mday => 3, :name => "Emancipation Day", :regions => [:us_vi]},
|
83
85
|
{:mday => 4, :name => "Independence Day", :regions => [:us]},
|
84
86
|
{:mday => 4, :function => "to_weekday_if_weekend(date)", :function_arguments => [:date], :name => "Independence Day (Holiday)", :regions => [:us_va]},
|
@@ -90,18 +92,21 @@ module Holidays
|
|
90
92
|
{:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_nt, :ca_nu]},
|
91
93
|
{:wday => 1, :week => 1, :type => :informal, :name => "Civic Holiday", :regions => [:ca_on, :ca_pe]},
|
92
94
|
{:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
|
95
|
+
{:wday => 1, :week => 1, :type => :informal, :name => "Terry Fox Day", :regions => [:ca_mb]},
|
93
96
|
{:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]},
|
94
97
|
{:wday => 1, :week => 2, :name => "Victory Day", :regions => [:us_ri]},
|
95
98
|
{:mday => 16, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Bennington Battle Day", :regions => [:us_vt]},
|
96
99
|
{:wday => 5, :week => 3, :name => "Statehood Day", :regions => [:us_hi]},
|
97
100
|
{:mday => 27, :name => "Lyndon Baines Johnson Day", :regions => [:us_tx]}],
|
98
101
|
9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
|
99
|
-
{:mday =>
|
102
|
+
{:mday => 30, :year_ranges => { :from => 2021 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "National Day for Truth and Reconciliation", :regions => [:ca_bc, :ca_nt, :ca_pe, :ca_yt]},
|
103
|
+
{:mday => 30, :year_ranges => { :from => 2021 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "National Day for Truth and Reconciliation", :regions => [:ca_ab, :ca_mb, :ca_nu]},
|
104
|
+
{:mday => 15, :type => :informal, :name => "Grito de Dolores", :regions => [:mx]},
|
100
105
|
{:mday => 16, :name => "Día de la Independencia", :regions => [:mx]},
|
101
106
|
{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]},
|
102
107
|
{:function => "rosh_hashanah(year)", :function_arguments => [:year], :name => "Rosh Hashanah", :regions => [:us_tx]},
|
103
108
|
{:function => "yom_kippur(year)", :function_arguments => [:year], :name => "Yom Kippur", :regions => [:us_tx]}],
|
104
|
-
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nt, :ca_nu, :ca_on, :ca_sk, :ca_yt]},
|
109
|
+
10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nt, :ca_nu, :ca_on, :ca_qc, :ca_sk, :ca_yt]},
|
105
110
|
{:mday => 12, :type => :informal, :name => "Día de la Raza", :regions => [:mx]},
|
106
111
|
{: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]},
|
107
112
|
{: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]},
|
@@ -112,7 +117,7 @@ module Holidays
|
|
112
117
|
{:mday => 1, :type => :informal, :name => "Todos los Santos", :regions => [:mx]},
|
113
118
|
{:mday => 2, :type => :informal, :name => "Los Fieles Difuntos", :regions => [:mx]},
|
114
119
|
{:wday => 1, :week => 3, :name => "Día de la Revolución", :regions => [:mx]},
|
115
|
-
{:function => "election_day(year)", :function_arguments => [:year], :name => "Election Day", :regions => [:us_de, :us_hi, :
|
120
|
+
{:function => "election_day(year)", :function_arguments => [:year], :name => "Election Day", :regions => [:us_de, :us_hi, :us_in, :us_mt, :us_nj, :us_ny, :us_pa, :us_ri]},
|
116
121
|
{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Veterans Day", :regions => [:us]},
|
117
122
|
{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:us]},
|
118
123
|
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Family Day", :regions => [:us_nv]},
|
@@ -121,20 +126,23 @@ module Holidays
|
|
121
126
|
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Lincoln's Birthday", :regions => [:us_in]},
|
122
127
|
{:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "American Indian Heritage Day", :regions => [:us_md]},
|
123
128
|
{: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]}],
|
124
|
-
12 => [{:mday => 25, :observed => "
|
125
|
-
{:mday =>
|
126
|
-
{:mday =>
|
129
|
+
12 => [{:mday => 25, :year_ranges => { :until => 2020 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
|
130
|
+
{:mday => 25, :year_ranges => { :from => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
|
131
|
+
{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt]},
|
132
|
+
{:mday => 26, :year_ranges => { :until => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
|
133
|
+
{:mday => 26, :year_ranges => { :from => 2020 },:observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
|
134
|
+
{:mday => 26, :observed => "to_monday_if_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_qc, :ca_sk, :ca_yt]},
|
127
135
|
{:mday => 12, :type => :informal, :name => "Día de la Virgen de Guadalupe", :regions => [:mx]},
|
128
136
|
{:mday => 24, :type => :informal, :name => "Nochebuena", :regions => [:mx]},
|
129
137
|
{:mday => 25, :name => "Navidad", :regions => [:mx]},
|
130
|
-
{:mday => 28, :name => "Los Santos Inocentes", :regions => [:mx]},
|
138
|
+
{:mday => 28, :type => :informal, :name => "Los Santos Inocentes", :regions => [:mx]},
|
131
139
|
{:mday => 24, :name => "Christmas Eve", :regions => [:us_ar, :us_mi, :us_nc, :us_sc, :us_tx, :us_wi]},
|
132
140
|
{:mday => 24, :function => "christmas_eve_holiday(date)", :function_arguments => [:date], :name => "Christmas Eve (Holiday)", :regions => [:us_mi, :us_sc, :us_va]},
|
133
|
-
{:mday => 25, :observed => "
|
141
|
+
{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:us]},
|
134
142
|
{:mday => 26, :name => "Day after Christmas", :regions => [:us_ar, :us_nc, :us_ok, :us_sc, :us_tn, :us_tx]},
|
135
143
|
{:mday => 31, :name => "New Year's Eve", :regions => [:us_mi, :us_wi]}],
|
136
144
|
4 => [{:mday => 30, :type => :informal, :name => "Día del Niño", :regions => [:mx]},
|
137
|
-
{:mday => 16, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Emancipation Day", :regions => [:us_dc
|
145
|
+
{:mday => 16, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Emancipation Day", :regions => [:us_dc]},
|
138
146
|
{:wday => 1, :week => 3, :name => "Patriots' Day", :regions => [:us_me, :us_ma]},
|
139
147
|
{:mday => 21, :name => "San Jacinto Day", :regions => [:us_tx]},
|
140
148
|
{:wday => 1, :week => -1, :name => "Confederate Memorial Day", :regions => [:us_al, :us_ms]},
|
@@ -148,7 +156,7 @@ module Holidays
|
|
148
156
|
|
149
157
|
def self.custom_methods
|
150
158
|
{
|
151
|
-
|
159
|
+
"ca_victoria_day(year)" => Proc.new { |year|
|
152
160
|
date = Date.civil(year,5,24)
|
153
161
|
if date.wday > 1
|
154
162
|
date -= (date.wday - 1)
|
@@ -12,11 +12,12 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:nyse]}],
|
16
16
|
1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:nyse]},
|
17
17
|
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:nyse]}],
|
18
18
|
2 => [{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:nyse]}],
|
19
19
|
5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:nyse]}],
|
20
|
+
6 => [{:mday => 19, :year_ranges => { :from => 2022 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:nyse]}],
|
20
21
|
7 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:nyse]}],
|
21
22
|
9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:nyse]}],
|
22
23
|
11 => [{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:nyse]}],
|
@@ -26,7 +27,7 @@ module Holidays
|
|
26
27
|
|
27
28
|
def self.custom_methods
|
28
29
|
{
|
29
|
-
|
30
|
+
|
30
31
|
}
|
31
32
|
end
|
32
33
|
end
|
@@ -12,8 +12,9 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
16
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:nz]}
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:nz]},
|
16
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:nz]},
|
17
|
+
{:function => "matariki(year)", :function_arguments => [:year], :name => "Matariki", :regions => [:nz]}],
|
17
18
|
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:nz]},
|
18
19
|
{:mday => 2, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Day after New Year's Day", :regions => [:nz]},
|
19
20
|
{:mday => 17, :name => "Southland Anniversary Day", :regions => [:nz_sl]},
|
@@ -40,7 +41,7 @@ module Holidays
|
|
40
41
|
|
41
42
|
def self.custom_methods
|
42
43
|
{
|
43
|
-
|
44
|
+
"closest_monday(date)" => Proc.new { |date|
|
44
45
|
if [1, 2, 3, 4].include?(date.wday)
|
45
46
|
date -= (date.wday - 1)
|
46
47
|
elsif 0 == date.wday
|
@@ -59,6 +60,43 @@ date - 3
|
|
59
60
|
date + 7
|
60
61
|
},
|
61
62
|
|
63
|
+
"matariki(year)" => Proc.new { |year|
|
64
|
+
@matariki_dates ||= {
|
65
|
+
'2022' => Date.civil(2022, 6, 24),
|
66
|
+
'2023' => Date.civil(2023, 7, 14),
|
67
|
+
'2024' => Date.civil(2024, 6, 28),
|
68
|
+
'2025' => Date.civil(2025, 6, 20),
|
69
|
+
'2026' => Date.civil(2026, 7, 10),
|
70
|
+
'2027' => Date.civil(2027, 6, 25),
|
71
|
+
'2028' => Date.civil(2028, 7, 14),
|
72
|
+
'2029' => Date.civil(2029, 7, 6),
|
73
|
+
'2030' => Date.civil(2030, 6, 21),
|
74
|
+
'2031' => Date.civil(2031, 7, 11),
|
75
|
+
'2032' => Date.civil(2032, 7, 2),
|
76
|
+
'2033' => Date.civil(2033, 6, 24),
|
77
|
+
'2034' => Date.civil(2034, 7, 7),
|
78
|
+
'2035' => Date.civil(2035, 6, 29),
|
79
|
+
'2036' => Date.civil(2036, 7, 18),
|
80
|
+
'2037' => Date.civil(2037, 7, 10),
|
81
|
+
'2038' => Date.civil(2038, 6, 25),
|
82
|
+
'2039' => Date.civil(2039, 7, 15),
|
83
|
+
'2040' => Date.civil(2040, 7, 6),
|
84
|
+
'2041' => Date.civil(2041, 7, 19),
|
85
|
+
'2042' => Date.civil(2042, 7, 11),
|
86
|
+
'2043' => Date.civil(2043, 7, 3),
|
87
|
+
'2044' => Date.civil(2044, 6, 24),
|
88
|
+
'2045' => Date.civil(2045, 7, 7),
|
89
|
+
'2046' => Date.civil(2046, 6, 29),
|
90
|
+
'2047' => Date.civil(2047, 7, 19),
|
91
|
+
'2048' => Date.civil(2048, 7, 3),
|
92
|
+
'2049' => Date.civil(2049, 6, 25),
|
93
|
+
'2050' => Date.civil(2050, 7, 15),
|
94
|
+
'2051' => Date.civil(2051, 6, 30),
|
95
|
+
'2052' => Date.civil(2052, 6, 21),
|
96
|
+
}
|
97
|
+
@matariki_dates[year.to_s]
|
98
|
+
},
|
99
|
+
|
62
100
|
|
63
101
|
}
|
64
102
|
end
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:pe]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:pe]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Pascua", :regions => [:pe]}],
|
18
18
|
1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:pe]},
|
@@ -36,7 +36,7 @@ module Holidays
|
|
36
36
|
|
37
37
|
def self.custom_methods
|
38
38
|
{
|
39
|
-
|
39
|
+
|
40
40
|
}
|
41
41
|
end
|
42
42
|
end
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Maundy Thursday", :regions => [:ph]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:ph]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Holy Saturday", :regions => [:ph]},
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:ph]}],
|
@@ -33,7 +33,7 @@ module Holidays
|
|
33
33
|
|
34
34
|
def self.custom_methods
|
35
35
|
{
|
36
|
-
|
36
|
+
"ph_heroes_day(year)" => Proc.new { |year|
|
37
37
|
date = Date.new(year, 8, -1)
|
38
38
|
|
39
39
|
if date.wday != 1
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -52, :type => :informal, :name => "Tłusty Czwartek", :regions => [:pl]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :type => :informal, :name => "Ostatki", :regions => [:pl]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -46, :type => :informal, :name => "Środa Popielcowa", :regions => [:pl]},
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -7, :type => :informal, :name => "Niedziela Palmowa", :regions => [:pl]},
|
@@ -57,7 +57,7 @@ module Holidays
|
|
57
57
|
|
58
58
|
def self.custom_methods
|
59
59
|
{
|
60
|
-
|
60
|
+
"pl_trzech_kroli(year)" => Proc.new { |year|
|
61
61
|
year >= 2011 ? 6 : nil
|
62
62
|
},
|
63
63
|
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :type => :informal, :name => "Carnaval", :regions => [:pt]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Sexta-feira Santa", :regions => [:pt]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Páscoa", :regions => [:pt]},
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Corpo de Deus", :regions => [:pt]}],
|
@@ -33,7 +33,7 @@ module Holidays
|
|
33
33
|
|
34
34
|
def self.custom_methods
|
35
35
|
{
|
36
|
-
|
36
|
+
|
37
37
|
}
|
38
38
|
end
|
39
39
|
end
|
@@ -12,13 +12,16 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :year_ranges => { :from => 2018 },:name => "Paștele - Vinerea Mare", :regions => [:ro]},
|
16
|
+
{:function => "orthodox_easter(year)", :function_arguments => [:year], :name => "Paștele - duminică", :regions => [:ro]},
|
16
17
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Paștele - luni", :regions => [:ro]},
|
17
18
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Rusaliile - 50", :regions => [:ro]},
|
18
19
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Rusaliile - 51", :regions => [:ro]}],
|
19
20
|
1 => [{:mday => 1, :name => "Anul nou", :regions => [:ro]},
|
20
|
-
{:mday => 2, :name => "Anul nou", :regions => [:ro]}
|
21
|
+
{:mday => 2, :name => "Anul nou", :regions => [:ro]},
|
22
|
+
{:mday => 24, :year_ranges => { :from => 2017 },:name => "Unirea Principatelor Române", :regions => [:ro]}],
|
21
23
|
5 => [{:mday => 1, :name => "Ziua muncii", :regions => [:ro]}],
|
24
|
+
6 => [{:mday => 1, :year_ranges => { :from => 2017 },:name => "Ziua Copilului", :regions => [:ro]}],
|
22
25
|
8 => [{:mday => 15, :name => "Adormirea Maicii Domnului", :regions => [:ro]}],
|
23
26
|
11 => [{:mday => 30, :name => "Sfântul Apostol Andrei", :regions => [:ro]}],
|
24
27
|
12 => [{:mday => 1, :name => "Ziua Națională", :regions => [:ro]},
|
@@ -29,7 +32,7 @@ module Holidays
|
|
29
32
|
|
30
33
|
def self.custom_methods
|
31
34
|
{
|
32
|
-
|
35
|
+
|
33
36
|
}
|
34
37
|
end
|
35
38
|
end
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Велики петак", :regions => [:rs_cyrl]},
|
16
16
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Велика Субота", :regions => [:rs_cyrl]},
|
17
17
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :name => "Васкрс", :regions => [:rs_cyrl]},
|
18
18
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Васкрсни понедељак", :regions => [:rs_cyrl]}],
|
@@ -24,7 +24,7 @@ module Holidays
|
|
24
24
|
{:mday => 16, :name => "Дан државности Србије", :regions => [:rs_cyrl]}],
|
25
25
|
5 => [{:mday => 1, :name => "Празник рада", :regions => [:rs_cyrl]},
|
26
26
|
{:mday => 2, :name => "Празник рада", :regions => [:rs_cyrl]},
|
27
|
-
{:mday => 9, :name => "Дан победе над фашизмом", :regions => [:rs_cyrl]}],
|
27
|
+
{:mday => 9, :type => :informal, :name => "Дан победе над фашизмом", :regions => [:rs_cyrl]}],
|
28
28
|
6 => [{:mday => 28, :name => "Видовдан", :regions => [:rs_cyrl]}],
|
29
29
|
11 => [{:mday => 11, :name => "Дан примирја", :regions => [:rs_cyrl]}]
|
30
30
|
}
|
@@ -32,7 +32,7 @@ module Holidays
|
|
32
32
|
|
33
33
|
def self.custom_methods
|
34
34
|
{
|
35
|
-
|
35
|
+
|
36
36
|
}
|
37
37
|
end
|
38
38
|
end
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Veliki Petak", :regions => [:rs_la]},
|
16
16
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Velika Subota", :regions => [:rs_la]},
|
17
17
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :name => "Uskrs", :regions => [:rs_la]},
|
18
18
|
{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Vaskrsni ponedeljak", :regions => [:rs_la]}],
|
@@ -24,7 +24,7 @@ module Holidays
|
|
24
24
|
{:mday => 16, :name => "Dan državnosti Srbije", :regions => [:rs_la]}],
|
25
25
|
5 => [{:mday => 1, :name => "Praznik rada", :regions => [:rs_la]},
|
26
26
|
{:mday => 2, :name => "Praznik rada", :regions => [:rs_la]},
|
27
|
-
{:mday => 9, :name => "Dan pobede", :regions => [:rs_la]}],
|
27
|
+
{:mday => 9, :type => :informal, :name => "Dan pobede", :regions => [:rs_la]}],
|
28
28
|
6 => [{:mday => 28, :name => "Vidovdan", :regions => [:rs_la]}],
|
29
29
|
11 => [{:mday => 11, :name => "Dan primirja", :regions => [:rs_la]}]
|
30
30
|
}
|
@@ -32,7 +32,7 @@ module Holidays
|
|
32
32
|
|
33
33
|
def self.custom_methods
|
34
34
|
{
|
35
|
-
|
35
|
+
|
36
36
|
}
|
37
37
|
end
|
38
38
|
end
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
1 => [{:mday => 1, :name => "Новый год", :regions => [:ru]},
|
16
16
|
{:mday => 2, :name => "Новогодний праздник", :regions => [:ru]},
|
17
17
|
{:mday => 3, :name => "Новогодний праздник", :regions => [:ru]},
|
18
18
|
{:mday => 4, :name => "Новогодний праздник", :regions => [:ru]},
|
@@ -30,7 +30,7 @@ module Holidays
|
|
30
30
|
|
31
31
|
def self.custom_methods
|
32
32
|
{
|
33
|
-
|
33
|
+
|
34
34
|
}
|
35
35
|
end
|
36
36
|
end
|
@@ -12,13 +12,13 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -49, :type => :informal, :name => "Fastelavn", :regions => [:dk]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -7, :type => :informal, :name => "Palmesøndag", :regions => [:dk]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Skærtorsdag", :regions => [:dk]},
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Langfredag", :regions => [:dk]},
|
19
19
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Påskedag", :regions => [:dk]},
|
20
20
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "2. påskedag", :regions => [:dk]},
|
21
|
-
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :name => "Store Bededag", :regions => [:dk]},
|
21
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :year_ranges => { :until => 2023 },:name => "Store Bededag", :regions => [:dk]},
|
22
22
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Kristi Himmelfartsdag", :regions => [:dk]},
|
23
23
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Pinsedag", :regions => [:dk]},
|
24
24
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "2. Pinsedag", :regions => [:dk]},
|
@@ -115,7 +115,7 @@ module Holidays
|
|
115
115
|
|
116
116
|
def self.custom_methods
|
117
117
|
{
|
118
|
-
|
118
|
+
"is_sumardagurinn_fyrsti(year)" => Proc.new { |year|
|
119
119
|
date = Date.civil(year,4,18)
|
120
120
|
if date.wday < 4
|
121
121
|
date += (4 - date.wday)
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Långfredagen", :regions => [:se]},
|
16
16
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :type => :informal, :name => "Påskafton", :regions => [:se]},
|
17
17
|
{:function => "easter(year)", :function_arguments => [:year], :name => "Påskdagen", :regions => [:se]},
|
18
18
|
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Annandag påsk", :regions => [:se]},
|
@@ -34,7 +34,7 @@ module Holidays
|
|
34
34
|
|
35
35
|
def self.custom_methods
|
36
36
|
{
|
37
|
-
|
37
|
+
"se_midsommardagen(year)" => Proc.new { |year|
|
38
38
|
date = Date.civil(year,6,20)
|
39
39
|
date += (6 - date.wday)
|
40
40
|
date
|
@@ -12,7 +12,7 @@ module Holidays
|
|
12
12
|
|
13
13
|
def self.holidays_by_month
|
14
14
|
{
|
15
|
-
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:sg]}],
|
16
16
|
1 => [{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:sg]}],
|
17
17
|
2 => [{:mday => 14, :type => :informal, :name => "Valentine's Day", :regions => [:sg]},
|
18
18
|
{:mday => 15, :type => :informal, :name => "Total Defence Day", :regions => [:sg]}],
|
@@ -24,7 +24,7 @@ module Holidays
|
|
24
24
|
|
25
25
|
def self.custom_methods
|
26
26
|
{
|
27
|
-
|
27
|
+
|
28
28
|
}
|
29
29
|
end
|
30
30
|
end
|