holidays 4.2.0 → 8.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitmodules +3 -0
- data/CHANGELOG.md +195 -0
- data/Makefile +45 -0
- data/README.md +253 -77
- data/Rakefile +10 -11
- data/bin/console +0 -0
- data/bin/setup +1 -0
- data/doc/CONTRIBUTING.md +72 -0
- data/doc/MAINTAINERS.md +81 -0
- data/{REFERENCES → doc/REFERENCES} +0 -0
- data/holidays.gemspec +9 -9
- data/lib/generated_definitions/MANIFEST +26 -4
- data/lib/generated_definitions/REGIONS.rb +3 -1
- data/lib/generated_definitions/ar.rb +4 -10
- data/lib/generated_definitions/at.rb +3 -9
- data/lib/generated_definitions/au.rb +32 -25
- data/lib/generated_definitions/be_fr.rb +2 -8
- data/lib/generated_definitions/be_nl.rb +2 -8
- data/lib/generated_definitions/bg.rb +2 -8
- data/lib/generated_definitions/br.rb +2 -8
- data/lib/generated_definitions/ca.rb +33 -32
- data/lib/generated_definitions/ch.rb +17 -11
- data/lib/generated_definitions/cl.rb +38 -12
- data/lib/generated_definitions/co.rb +121 -0
- data/lib/generated_definitions/cr.rb +2 -8
- data/lib/generated_definitions/cz.rb +2 -8
- data/lib/generated_definitions/de.rb +11 -14
- data/lib/generated_definitions/dk.rb +2 -8
- data/lib/generated_definitions/{ecb_target.rb → ecbtarget.rb} +10 -16
- data/lib/generated_definitions/ee.rb +36 -0
- data/lib/generated_definitions/el.rb +2 -8
- data/lib/generated_definitions/es.rb +8 -11
- data/lib/generated_definitions/europe.rb +121 -51
- data/lib/generated_definitions/federalreserve.rb +34 -0
- data/lib/generated_definitions/{federal_reserve.rb → federalreservebanks.rb} +14 -20
- data/lib/generated_definitions/fedex.rb +3 -9
- data/lib/generated_definitions/fi.rb +2 -8
- data/lib/generated_definitions/fr.rb +6 -10
- data/lib/generated_definitions/gb.rb +12 -16
- data/lib/generated_definitions/ge.rb +41 -0
- data/lib/generated_definitions/hk.rb +106 -0
- data/lib/generated_definitions/hr.rb +10 -14
- data/lib/generated_definitions/hu.rb +4 -9
- data/lib/generated_definitions/ie.rb +3 -17
- data/lib/generated_definitions/is.rb +3 -9
- data/lib/generated_definitions/it.rb +16 -13
- data/lib/generated_definitions/jp.rb +47 -36
- data/lib/generated_definitions/kr.rb +40 -0
- data/lib/generated_definitions/kz.rb +38 -0
- data/lib/generated_definitions/li.rb +2 -8
- data/lib/generated_definitions/lt.rb +2 -8
- data/lib/generated_definitions/lu.rb +35 -0
- data/lib/generated_definitions/lv.rb +52 -0
- data/lib/generated_definitions/ma.rb +2 -8
- data/lib/generated_definitions/mt_en.rb +38 -0
- data/lib/generated_definitions/mt_mt.rb +38 -0
- data/lib/generated_definitions/mx.rb +6 -12
- data/lib/generated_definitions/my.rb +30 -0
- data/lib/generated_definitions/nerc.rb +2 -8
- data/lib/generated_definitions/ng.rb +33 -0
- data/lib/generated_definitions/nl.rb +2 -8
- data/lib/generated_definitions/no.rb +2 -8
- data/lib/generated_definitions/northamerica.rb +223 -0
- data/lib/generated_definitions/nyse.rb +3 -9
- data/lib/generated_definitions/nz.rb +2 -9
- data/lib/generated_definitions/pe.rb +43 -0
- data/lib/generated_definitions/ph.rb +4 -10
- data/lib/generated_definitions/pl.rb +2 -8
- data/lib/generated_definitions/pt.rb +12 -12
- data/lib/generated_definitions/ro.rb +6 -9
- 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/scandinavia.rb +3 -9
- data/lib/generated_definitions/se.rb +2 -8
- data/lib/generated_definitions/sg.rb +2 -8
- data/lib/generated_definitions/si.rb +2 -8
- data/lib/generated_definitions/sk.rb +2 -8
- data/lib/generated_definitions/southamerica.rb +228 -0
- data/lib/generated_definitions/th.rb +36 -0
- data/lib/generated_definitions/tn.rb +32 -0
- data/lib/generated_definitions/tr.rb +64 -0
- data/lib/generated_definitions/ua.rb +37 -0
- data/lib/generated_definitions/{united_nations.rb → unitednations.rb} +61 -67
- data/lib/generated_definitions/ups.rb +3 -9
- data/lib/generated_definitions/us.rb +113 -23
- data/lib/generated_definitions/ve.rb +2 -8
- data/lib/generated_definitions/vi.rb +6 -11
- data/lib/generated_definitions/za.rb +2 -8
- data/lib/holidays/core_extensions/date.rb +21 -3
- data/lib/holidays/core_extensions/time.rb +23 -0
- data/lib/holidays/date_calculator/day_of_month.rb +3 -3
- data/lib/holidays/date_calculator/lunar_date.rb +371 -0
- data/lib/holidays/date_calculator/weekend_modifier.rb +0 -7
- data/lib/holidays/definition/context/function_processor.rb +91 -0
- data/lib/holidays/definition/context/generator.rb +37 -96
- data/lib/holidays/definition/context/load.rb +29 -0
- data/lib/holidays/definition/context/merger.rb +0 -4
- data/lib/holidays/definition/decorator/test.rb +37 -0
- data/lib/holidays/definition/entity/test.rb +11 -0
- data/lib/holidays/definition/generator/module.rb +54 -0
- data/lib/holidays/definition/generator/regions.rb +55 -0
- data/lib/holidays/definition/generator/test.rb +51 -0
- data/lib/holidays/definition/parser/custom_method.rb +3 -5
- data/lib/holidays/definition/parser/test.rb +86 -0
- data/lib/holidays/definition/repository/cache.rb +23 -9
- data/lib/holidays/definition/repository/holidays_by_month.rb +10 -2
- data/lib/holidays/definition/repository/proc_result_cache.rb +1 -1
- data/lib/holidays/definition/repository/regions.rb +23 -13
- data/lib/holidays/definition/validator/custom_method.rb +1 -1
- data/lib/holidays/definition/validator/region.rb +2 -11
- data/lib/holidays/definition/validator/test.rb +71 -0
- data/lib/holidays/errors.rb +5 -0
- data/lib/holidays/factory/date_calculator.rb +42 -0
- data/lib/holidays/factory/definition.rb +143 -0
- data/lib/holidays/factory/finder.rb +70 -0
- data/lib/holidays/finder/context/between.rb +45 -0
- data/lib/holidays/{use_case → finder}/context/dates_driver_builder.rb +11 -15
- data/lib/holidays/finder/context/next_holiday.rb +57 -0
- data/lib/holidays/finder/context/parse_options.rb +104 -0
- data/lib/holidays/finder/context/search.rb +110 -0
- data/lib/holidays/finder/context/year_holiday.rb +57 -0
- data/lib/holidays/finder/rules/in_region.rb +31 -0
- data/lib/holidays/finder/rules/year_range.rb +58 -0
- data/lib/holidays/load_all_definitions.rb +16 -17
- data/lib/holidays/version.rb +1 -1
- data/lib/holidays.rb +50 -125
- data/test/coverage_report.rb +26 -0
- data/test/data/test_custom_informal_holidays_defs.yaml +11 -0
- data/test/data/test_custom_year_range_holiday_defs.yaml +13 -10
- data/test/data/test_invalid_region.rb +15 -0
- data/test/data/test_multiple_custom_holiday_defs.yaml +7 -4
- 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/data/test_region.rb +15 -0
- data/test/data/test_single_custom_holiday_defs.yaml +7 -4
- data/test/data/test_single_custom_holiday_with_custom_procs.yaml +11 -7
- data/test/defs/test_defs_ar.rb +41 -19
- data/test/defs/test_defs_at.rb +18 -11
- data/test/defs/test_defs_au.rb +185 -126
- data/test/defs/test_defs_be_fr.rb +33 -14
- data/test/defs/test_defs_be_nl.rb +33 -14
- data/test/defs/test_defs_bg.rb +29 -17
- data/test/defs/test_defs_br.rb +33 -19
- data/test/defs/test_defs_ca.rb +246 -136
- data/test/defs/test_defs_ch.rb +35 -23
- data/test/defs/test_defs_cl.rb +57 -27
- data/test/defs/test_defs_co.rb +113 -0
- data/test/defs/test_defs_cr.rb +17 -11
- data/test/defs/test_defs_cz.rb +25 -15
- data/test/defs/test_defs_de.rb +60 -59
- data/test/defs/test_defs_dk.rb +31 -19
- data/test/defs/test_defs_ecbtarget.rb +27 -0
- data/test/defs/test_defs_ee.rb +41 -0
- data/test/defs/test_defs_el.rb +29 -17
- data/test/defs/test_defs_es.rb +116 -52
- data/test/defs/test_defs_europe.rb +1382 -701
- data/test/defs/test_defs_federalreserve.rb +113 -0
- data/test/defs/test_defs_federalreservebanks.rb +247 -0
- data/test/defs/test_defs_fedex.rb +19 -12
- data/test/defs/test_defs_fi.rb +47 -27
- data/test/defs/test_defs_fr.rb +31 -18
- data/test/defs/test_defs_gb.rb +120 -51
- data/test/defs/test_defs_ge.rb +53 -0
- data/test/defs/test_defs_hk.rb +59 -0
- data/test/defs/test_defs_hr.rb +32 -18
- data/test/defs/test_defs_hu.rb +34 -16
- data/test/defs/test_defs_ie.rb +41 -25
- data/test/defs/test_defs_is.rb +39 -22
- data/test/defs/test_defs_it.rb +43 -14
- data/test/defs/test_defs_jp.rb +141 -55
- data/test/defs/test_defs_kr.rb +37 -0
- data/test/defs/test_defs_kz.rb +39 -0
- data/test/defs/test_defs_li.rb +20 -20
- data/test/defs/test_defs_lt.rb +51 -30
- data/test/defs/test_defs_lu.rb +35 -0
- data/test/defs/test_defs_lv.rb +90 -0
- data/test/defs/test_defs_ma.rb +17 -11
- data/test/defs/test_defs_mt_en.rb +41 -0
- data/test/defs/test_defs_mt_mt.rb +41 -0
- data/test/defs/test_defs_mx.rb +34 -23
- data/test/defs/test_defs_my.rb +23 -0
- data/test/defs/test_defs_nerc.rb +17 -11
- data/test/defs/test_defs_ng.rb +29 -0
- data/test/defs/test_defs_nl.rb +21 -13
- data/test/defs/test_defs_no.rb +31 -18
- data/test/defs/test_defs_northamerica.rb +644 -0
- data/test/defs/test_defs_nyse.rb +27 -11
- data/test/defs/test_defs_nz.rb +47 -28
- data/test/defs/test_defs_pe.rb +47 -0
- data/test/defs/test_defs_ph.rb +17 -13
- data/test/defs/test_defs_pl.rb +200 -119
- data/test/defs/test_defs_pt.rb +35 -15
- data/test/defs/test_defs_ro.rb +53 -24
- data/test/defs/test_defs_rs_cyrl.rb +46 -0
- data/test/defs/test_defs_rs_la.rb +46 -0
- data/test/defs/test_defs_ru.rb +34 -0
- data/test/defs/test_defs_scandinavia.rb +193 -116
- data/test/defs/test_defs_se.rb +47 -28
- data/test/defs/test_defs_sg.rb +13 -9
- data/test/defs/test_defs_si.rb +93 -24
- data/test/defs/test_defs_sk.rb +29 -17
- data/test/defs/test_defs_southamerica.rb +307 -0
- data/test/defs/test_defs_th.rb +33 -0
- data/test/defs/test_defs_tn.rb +27 -0
- data/test/defs/test_defs_tr.rb +60 -0
- data/test/defs/test_defs_ua.rb +41 -0
- data/test/defs/{test_defs_united_nations.rb → test_defs_unitednations.rb} +3 -4
- data/test/defs/test_defs_ups.rb +19 -12
- data/test/defs/test_defs_us.rb +370 -30
- data/test/defs/test_defs_ve.rb +23 -16
- data/test/defs/test_defs_vi.rb +10 -6
- data/test/defs/test_defs_za.rb +23 -14
- data/test/holidays/core_extensions/test_date.rb +3 -2
- data/test/holidays/core_extensions/test_date_time.rb +60 -0
- data/test/holidays/date_calculator/test_lunar_date.rb +89 -0
- data/test/holidays/definition/context/test_function_processor.rb +199 -0
- data/test/holidays/definition/context/test_generator.rb +66 -35
- data/test/holidays/definition/context/test_load.rb +37 -0
- data/test/holidays/definition/decorator/test_test.rb +123 -0
- data/test/holidays/definition/generator/test_module.rb +268 -0
- data/test/holidays/definition/generator/test_regions.rb +97 -0
- data/test/holidays/definition/generator/test_test.rb +113 -0
- data/test/holidays/definition/parser/test_custom_method.rb +6 -6
- data/test/holidays/definition/parser/test_test.rb +142 -0
- data/test/holidays/definition/repository/test_cache.rb +47 -6
- data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
- data/test/holidays/definition/repository/test_proc_result_cache.rb +8 -1
- data/test/holidays/definition/repository/test_regions.rb +31 -13
- data/test/holidays/definition/validator/test_custom_method.rb +5 -0
- data/test/holidays/definition/validator/test_region.rb +16 -12
- data/test/holidays/definition/validator/test_test.rb +60 -0
- data/test/holidays/finder/context/test_between.rb +172 -0
- data/test/holidays/{use_case → finder}/context/test_dates_driver_builder.rb +2 -2
- data/test/holidays/finder/context/test_next_holiday.rb +156 -0
- data/test/holidays/finder/context/test_parse_options.rb +141 -0
- data/test/holidays/finder/context/test_search.rb +232 -0
- data/test/holidays/finder/context/test_year_holiday.rb +202 -0
- data/test/holidays/finder/rules/test_in_region.rb +42 -0
- data/test/holidays/finder/rules/test_year_range.rb +166 -0
- data/test/integration/README.md +9 -0
- data/test/{test_all_regions.rb → integration/test_all_regions.rb} +18 -4
- data/test/integration/test_any_holidays_during_work_week.rb +90 -0
- data/test/integration/test_available_regions.rb +23 -0
- data/test/{test_custom_holidays.rb → integration/test_custom_holidays.rb} +6 -6
- data/test/integration/test_custom_informal_holidays.rb +15 -0
- data/test/{test_custom_year_range_holidays.rb → integration/test_custom_year_range_holidays.rb} +1 -9
- data/test/{test_holidays.rb → integration/test_holidays.rb} +100 -69
- data/test/{test_holidays_between.rb → integration/test_holidays_between.rb} +19 -17
- data/test/integration/test_multiple_regions.rb +71 -0
- data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
- data/test/integration/test_nonstandard_regions.rb +25 -0
- data/test/test_helper.rb +7 -3
- metadata +204 -132
- data/CONTRIBUTING.md +0 -41
- data/benchmark.rb +0 -8
- data/definitions/README.md +0 -353
- data/definitions/ar.yaml +0 -93
- data/definitions/at.yaml +0 -72
- data/definitions/au.yaml +0 -375
- data/definitions/be_fr.yaml +0 -69
- data/definitions/be_nl.yaml +0 -69
- data/definitions/bg.yaml +0 -127
- data/definitions/br.yaml +0 -77
- data/definitions/ca.yaml +0 -302
- data/definitions/ch.yaml +0 -193
- data/definitions/cl.yaml +0 -94
- data/definitions/cr.yaml +0 -65
- data/definitions/cz.yaml +0 -73
- data/definitions/de.yaml +0 -209
- data/definitions/dk.yaml +0 -130
- data/definitions/ecb_target.yaml +0 -44
- data/definitions/el.yaml +0 -84
- data/definitions/es.yaml +0 -203
- data/definitions/federal_reserve.yaml +0 -114
- data/definitions/fedex.yaml +0 -62
- data/definitions/fi.yaml +0 -115
- data/definitions/fr.yaml +0 -79
- data/definitions/gb.yaml +0 -151
- data/definitions/hr.yaml +0 -79
- data/definitions/hu.yaml +0 -63
- data/definitions/ie.yaml +0 -89
- data/definitions/index.yaml +0 -57
- data/definitions/is.yaml +0 -146
- data/definitions/it.yaml +0 -67
- data/definitions/jp.yaml +0 -316
- data/definitions/li.yaml +0 -107
- data/definitions/lt.yaml +0 -89
- data/definitions/ma.yaml +0 -52
- data/definitions/mx.yaml +0 -106
- data/definitions/nerc.yaml +0 -51
- data/definitions/nl.yaml +0 -73
- data/definitions/no.yaml +0 -90
- data/definitions/north_america_informal.yaml +0 -61
- data/definitions/nyse.yaml +0 -64
- data/definitions/nz.yaml +0 -163
- data/definitions/ph.yaml +0 -94
- data/definitions/pl.yaml +0 -320
- data/definitions/pt.yaml +0 -69
- data/definitions/ro.yaml +0 -78
- data/definitions/se.yaml +0 -120
- data/definitions/sg.yaml +0 -56
- data/definitions/si.yaml +0 -86
- data/definitions/sk.yaml +0 -80
- data/definitions/united_nations.yaml +0 -189
- data/definitions/ups.yaml +0 -62
- data/definitions/us.yaml +0 -103
- data/definitions/ve.yaml +0 -74
- data/definitions/vi.yaml +0 -29
- data/definitions/za.yaml +0 -80
- data/lib/generated_definitions/north_america.rb +0 -126
- data/lib/holidays/date_calculator_factory.rb +0 -35
- data/lib/holidays/definition_factory.rb +0 -86
- data/lib/holidays/option/context/parse_options.rb +0 -106
- data/lib/holidays/option_factory.rb +0 -15
- data/lib/holidays/use_case/context/between.rb +0 -45
- data/lib/holidays/use_case/context/context_common.rb +0 -123
- data/lib/holidays/use_case/context/next_holiday.rb +0 -54
- data/lib/holidays/use_case_factory.rb +0 -31
- data/test/defs/test_defs_ecb_target.rb +0 -23
- data/test/defs/test_defs_federal_reserve.rb +0 -69
- data/test/defs/test_defs_north_america.rb +0 -195
- data/test/holidays/option/context/test_parse_options.rb +0 -74
- data/test/holidays/test_date_calculator_factory.rb +0 -27
- data/test/holidays/test_definition_factory.rb +0 -49
- data/test/holidays/test_option_factory.rb +0 -9
- data/test/holidays/test_use_case_factory.rb +0 -13
- data/test/holidays/use_case/context/test_between.rb +0 -77
- data/test/test_multiple_regions.rb +0 -24
@@ -0,0 +1,60 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: definitions/tr.yaml
|
7
|
+
class TrDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_tr
|
10
|
+
assert_equal "Yılbaşı", (Holidays.on(Date.civil(2017, 1, 1), [:tr])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Ulusal Egemenlik ve Çocuk Bayramı", (Holidays.on(Date.civil(2017, 4, 23), [:tr])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Emek ve Dayanışma Günü", (Holidays.on(Date.civil(2017, 5, 1), [:tr])[0] || {})[:name]
|
15
|
+
|
16
|
+
assert_equal "Atatürk'ü Anma Gençlik ve Spor Bayramı", (Holidays.on(Date.civil(2017, 5, 19), [:tr])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Zafer Bayramı", (Holidays.on(Date.civil(2017, 8, 30), [:tr])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Cumhuriyet Bayramı", (Holidays.on(Date.civil(2017, 10, 29), [:tr])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "Ramazan Bayramı", (Holidays.on(Date.civil(2017, 6, 25), [:tr])[0] || {})[:name]
|
23
|
+
assert_equal "Ramazan Bayramı", (Holidays.on(Date.civil(2018, 6, 15), [:tr])[0] || {})[:name]
|
24
|
+
assert_equal "Ramazan Bayramı", (Holidays.on(Date.civil(2019, 6, 4), [:tr])[0] || {})[:name]
|
25
|
+
assert_equal "Ramazan Bayramı", (Holidays.on(Date.civil(2020, 5, 24), [:tr])[0] || {})[:name]
|
26
|
+
|
27
|
+
assert_equal "Ramazan Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2017, 6, 26), [:tr])[0] || {})[:name]
|
28
|
+
assert_equal "Ramazan Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2018, 6, 16), [:tr])[0] || {})[:name]
|
29
|
+
assert_equal "Ramazan Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2019, 6, 5), [:tr])[0] || {})[:name]
|
30
|
+
assert_equal "Ramazan Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2020, 5, 25), [:tr])[0] || {})[:name]
|
31
|
+
|
32
|
+
assert_equal "Ramazan Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2017, 6, 27), [:tr])[0] || {})[:name]
|
33
|
+
assert_equal "Ramazan Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2018, 6, 17), [:tr])[0] || {})[:name]
|
34
|
+
assert_equal "Ramazan Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2019, 6, 6), [:tr])[0] || {})[:name]
|
35
|
+
assert_equal "Ramazan Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2020, 5, 26), [:tr])[0] || {})[:name]
|
36
|
+
|
37
|
+
assert_equal "Demokrasi ve Milli Birlik Günü", (Holidays.on(Date.civil(2017, 7, 15), [:tr])[0] || {})[:name]
|
38
|
+
|
39
|
+
assert_equal "Kurban Bayramı", (Holidays.on(Date.civil(2017, 9, 1), [:tr])[0] || {})[:name]
|
40
|
+
assert_equal "Kurban Bayramı", (Holidays.on(Date.civil(2018, 8, 21), [:tr])[0] || {})[:name]
|
41
|
+
assert_equal "Kurban Bayramı", (Holidays.on(Date.civil(2019, 8, 11), [:tr])[0] || {})[:name]
|
42
|
+
assert_equal "Kurban Bayramı", (Holidays.on(Date.civil(2020, 7, 31), [:tr])[0] || {})[:name]
|
43
|
+
|
44
|
+
assert_equal "Kurban Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2017, 9, 2), [:tr])[0] || {})[:name]
|
45
|
+
assert_equal "Kurban Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2018, 8, 22), [:tr])[0] || {})[:name]
|
46
|
+
assert_equal "Kurban Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2019, 8, 12), [:tr])[0] || {})[:name]
|
47
|
+
assert_equal "Kurban Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2020, 8, 1), [:tr])[0] || {})[:name]
|
48
|
+
|
49
|
+
assert_equal "Kurban Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2017, 9, 3), [:tr])[0] || {})[:name]
|
50
|
+
assert_equal "Kurban Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2018, 8, 23), [:tr])[0] || {})[:name]
|
51
|
+
assert_equal "Kurban Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2019, 8, 13), [:tr])[0] || {})[:name]
|
52
|
+
assert_equal "Kurban Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2020, 8, 2), [:tr])[0] || {})[:name]
|
53
|
+
|
54
|
+
assert_equal "Kurban Bayramı (dördüncü tatil)", (Holidays.on(Date.civil(2017, 9, 4), [:tr])[0] || {})[:name]
|
55
|
+
assert_equal "Kurban Bayramı (dördüncü tatil)", (Holidays.on(Date.civil(2018, 8, 24), [:tr])[0] || {})[:name]
|
56
|
+
assert_equal "Kurban Bayramı (dördüncü tatil)", (Holidays.on(Date.civil(2019, 8, 14), [:tr])[0] || {})[:name]
|
57
|
+
assert_equal "Kurban Bayramı (dördüncü tatil)", (Holidays.on(Date.civil(2020, 8, 3), [:tr])[0] || {})[:name]
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: definitions/ua.yaml
|
7
|
+
class UaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_ua
|
10
|
+
assert_equal "Новий Рік", (Holidays.on(Date.civil(2018, 1, 1), [:ua])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 1, 7), [:ua])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 1, 8), [:ua], [:observed])[0] || {})[:name]
|
15
|
+
|
16
|
+
assert_equal "Міжнародний жіночий день", (Holidays.on(Date.civil(2018, 3, 8), [:ua])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Великдень", (Holidays.on(Date.civil(2018, 4, 8), [:ua])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Великдень", (Holidays.on(Date.civil(2018, 4, 9), [:ua], [:observed])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "День праці", (Holidays.on(Date.civil(2018, 5, 1), [:ua])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "День перемоги над нацизмом у Другій світовій війні", (Holidays.on(Date.civil(2018, 5, 9), [:ua])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Трійця", (Holidays.on(Date.civil(2018, 5, 27), [:ua])[0] || {})[:name]
|
27
|
+
|
28
|
+
assert_equal "Трійця", (Holidays.on(Date.civil(2018, 5, 28), [:ua], [:observed])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_equal "День Конституції", (Holidays.on(Date.civil(2018, 6, 28), [:ua])[0] || {})[:name]
|
31
|
+
|
32
|
+
assert_equal "День Незалежності", (Holidays.on(Date.civil(2018, 8, 24), [:ua])[0] || {})[:name]
|
33
|
+
|
34
|
+
assert_equal "День захисника України", (Holidays.on(Date.civil(2018, 10, 14), [:ua])[0] || {})[:name]
|
35
|
+
|
36
|
+
assert_equal "День захисника України", (Holidays.on(Date.civil(2018, 10, 15), [:ua], [:observed])[0] || {})[:name]
|
37
|
+
|
38
|
+
assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 12, 25), [:ua])[0] || {})[:name]
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
@@ -3,10 +3,9 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
3
3
|
|
4
4
|
# This file is generated by the Ruby Holiday gem.
|
5
5
|
#
|
6
|
-
# Definitions loaded: definitions/
|
7
|
-
class
|
8
|
-
|
9
|
-
def test_united_nations
|
6
|
+
# Definitions loaded: definitions/unitednations.yaml
|
7
|
+
class UnitednationsDefinitionTests < Test::Unit::TestCase # :nodoc:
|
10
8
|
|
9
|
+
def test_unitednations
|
11
10
|
end
|
12
11
|
end
|
data/test/defs/test_defs_ups.rb
CHANGED
@@ -7,18 +7,25 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
7
7
|
class UpsDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_ups
|
10
|
-
|
11
|
-
|
12
|
-
Date.civil(2008,
|
13
|
-
|
14
|
-
Date.civil(2008,
|
15
|
-
|
16
|
-
Date.civil(
|
17
|
-
|
18
|
-
Date.civil(2008,
|
19
|
-
|
20
|
-
|
21
|
-
|
10
|
+
assert_equal "New Year's Day", (Holidays.on(Date.civil(2008, 1, 1), [:ups])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Memorial Day", (Holidays.on(Date.civil(2008, 5, 26), [:ups])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Independence Day", (Holidays.on(Date.civil(2008, 7, 4), [:ups])[0] || {})[:name]
|
15
|
+
|
16
|
+
assert_equal "Labor Day", (Holidays.on(Date.civil(2008, 9, 1), [:ups])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Thanksgiving", (Holidays.on(Date.civil(2008, 11, 27), [:ups])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Day After Thanksgiving", (Holidays.on(Date.civil(2008, 11, 28), [:ups])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "Thanksgiving", (Holidays.on(Date.civil(2013, 11, 28), [:ups])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "Day After Thanksgiving", (Holidays.on(Date.civil(2013, 11, 29), [:ups])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ups])[0] || {})[:name]
|
27
|
+
|
28
|
+
assert_equal "New Year's Eve", (Holidays.on(Date.civil(2008, 12, 31), [:ups])[0] || {})[:name]
|
22
29
|
|
23
30
|
end
|
24
31
|
end
|
data/test/defs/test_defs_us.rb
CHANGED
@@ -3,41 +3,381 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
3
3
|
|
4
4
|
# This file is generated by the Ruby Holiday gem.
|
5
5
|
#
|
6
|
-
# Definitions loaded: definitions/us.yaml, definitions/
|
6
|
+
# Definitions loaded: definitions/us.yaml, definitions/northamericainformal.yaml
|
7
7
|
class UsDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_us
|
10
|
-
|
11
|
-
Date.civil(
|
12
|
-
Date.civil(
|
13
|
-
Date.civil(2008,5,26) => 'Memorial Day',
|
14
|
-
Date.civil(2008,7,4) => 'Independence Day',
|
15
|
-
Date.civil(2008,9,1) => 'Labor Day',
|
16
|
-
Date.civil(2008,10,13) => 'Columbus Day',
|
17
|
-
Date.civil(2008,11,11) => 'Veterans Day',
|
18
|
-
Date.civil(2008,11,27) => 'Thanksgiving',
|
19
|
-
Date.civil(2013,11,28) => 'Thanksgiving',
|
20
|
-
Date.civil(2008,12,25) => 'Christmas Day'}.each do |date, name|
|
21
|
-
assert_equal name, (Holidays.on(date, :us)[0] || {})[:name]
|
22
|
-
end
|
23
|
-
{Date.civil(2008, 3, 31) => 'Cesar Chavez Day',
|
24
|
-
Date.civil(2008, 11, 28) => 'Day after Thanksgiving',
|
25
|
-
Date.civil(2013, 11, 29) => 'Day after Thanksgiving'}.each do |date, name|
|
26
|
-
assert_equal name, (Holidays.on(date, :us, :us_ca)[0] || {})[:name]
|
27
|
-
end
|
10
|
+
assert_equal "Shrove Tuesday", (Holidays.on(Date.civil(2017, 2, 28), [:us_fl])[0] || {})[:name]
|
11
|
+
assert_equal "Shrove Tuesday", (Holidays.on(Date.civil(2018, 2, 13), [:us_fl])[0] || {})[:name]
|
12
|
+
assert_equal "Shrove Tuesday", (Holidays.on(Date.civil(2019, 3, 5), [:us_fl])[0] || {})[:name]
|
28
13
|
|
14
|
+
assert_equal "Mardi Gras Day", (Holidays.on(Date.civil(2017, 2, 28), [:us_la])[0] || {})[:name]
|
15
|
+
assert_equal "Mardi Gras Day", (Holidays.on(Date.civil(2018, 2, 13), [:us_la])[0] || {})[:name]
|
16
|
+
assert_equal "Mardi Gras Day", (Holidays.on(Date.civil(2019, 3, 5), [:us_la])[0] || {})[:name]
|
29
17
|
|
30
|
-
|
31
|
-
Date.civil(
|
32
|
-
Date.civil(
|
33
|
-
|
34
|
-
Date.civil(
|
35
|
-
Date.civil(
|
36
|
-
Date.civil(
|
37
|
-
|
38
|
-
Date.civil(
|
39
|
-
|
40
|
-
|
18
|
+
assert_nil (Holidays.on(Date.civil(2017, 2, 28), [:us])[0] || {})[:name]
|
19
|
+
assert_nil (Holidays.on(Date.civil(2018, 2, 13), [:us])[0] || {})[:name]
|
20
|
+
assert_nil (Holidays.on(Date.civil(2019, 3, 5), [:us])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "Good Friday", (Holidays.on(Date.civil(2017, 4, 14), [:us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_la, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn])[0] || {})[:name]
|
23
|
+
assert_equal "Good Friday", (Holidays.on(Date.civil(2018, 3, 30), [:us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_la, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn])[0] || {})[:name]
|
24
|
+
assert_equal "Good Friday", (Holidays.on(Date.civil(2019, 4, 19), [:us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_la, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Good Friday", (Holidays.on(Date.civil(2017, 4, 14), [:us], [:informal])[0] || {})[:name]
|
27
|
+
assert_equal "Good Friday", (Holidays.on(Date.civil(2018, 3, 30), [:us], [:informal])[0] || {})[:name]
|
28
|
+
assert_equal "Good Friday", (Holidays.on(Date.civil(2019, 4, 19), [:us], [:informal])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_nil (Holidays.on(Date.civil(2017, 2, 28), [:us])[0] || {})[:name]
|
31
|
+
assert_nil (Holidays.on(Date.civil(2018, 2, 13), [:us])[0] || {})[:name]
|
32
|
+
assert_nil (Holidays.on(Date.civil(2019, 3, 5), [:us])[0] || {})[:name]
|
33
|
+
|
34
|
+
assert_nil (Holidays.on(Date.civil(2017, 4, 16), [:us])[0] || {})[:name]
|
35
|
+
assert_nil (Holidays.on(Date.civil(2018, 4, 1), [:us])[0] || {})[:name]
|
36
|
+
assert_nil (Holidays.on(Date.civil(2019, 4, 21), [:us])[0] || {})[:name]
|
37
|
+
|
38
|
+
assert_equal "Easter Sunday", (Holidays.on(Date.civil(2017, 4, 16), [:us], [:informal])[0] || {})[:name]
|
39
|
+
assert_equal "Easter Sunday", (Holidays.on(Date.civil(2018, 4, 1), [:us], [:informal])[0] || {})[:name]
|
40
|
+
assert_equal "Easter Sunday", (Holidays.on(Date.civil(2019, 4, 21), [:us], [:informal])[0] || {})[:name]
|
41
|
+
|
42
|
+
assert_equal "New Year's Day", (Holidays.on(Date.civil(2017, 1, 1), [:us])[0] || {})[:name]
|
43
|
+
|
44
|
+
assert_equal "New Year's Day", (Holidays.on(Date.civil(2017, 1, 2), [:us], [:observed])[0] || {})[:name]
|
45
|
+
|
46
|
+
assert_equal "Martin Luther King, Jr. Day", (Holidays.on(Date.civil(2017, 1, 16), [:us])[0] || {})[:name]
|
47
|
+
assert_equal "Martin Luther King, Jr. Day", (Holidays.on(Date.civil(2018, 1, 15), [:us])[0] || {})[:name]
|
48
|
+
assert_equal "Martin Luther King, Jr. Day", (Holidays.on(Date.civil(2019, 1, 21), [:us])[0] || {})[:name]
|
49
|
+
|
50
|
+
assert_equal "Martin Luther King, Jr. Day", (Holidays.on(Date.civil(2016, 1, 18), [:us])[0] || {})[:name]
|
51
|
+
assert_equal "Martin Luther King, Jr. Day", (Holidays.on(Date.civil(2017, 1, 16), [:us])[0] || {})[:name]
|
52
|
+
assert_equal "Martin Luther King, Jr. Day", (Holidays.on(Date.civil(2018, 1, 15), [:us])[0] || {})[:name]
|
53
|
+
|
54
|
+
assert_equal "Martin Luther King's and Robert E. Lee's Birthdays", (Holidays.on(Date.civil(2016, 1, 18), [:us_ms])[0] || {})[:name]
|
55
|
+
assert_equal "Martin Luther King's and Robert E. Lee's Birthdays", (Holidays.on(Date.civil(2017, 1, 16), [:us_ms])[0] || {})[:name]
|
56
|
+
assert_equal "Martin Luther King's and Robert E. Lee's Birthdays", (Holidays.on(Date.civil(2018, 1, 15), [:us_ms])[0] || {})[:name]
|
57
|
+
|
58
|
+
assert_equal "Idaho Human Rights Day", (Holidays.on(Date.civil(2016, 1, 18), [:us_id])[0] || {})[:name]
|
59
|
+
assert_equal "Idaho Human Rights Day", (Holidays.on(Date.civil(2017, 1, 16), [:us_id])[0] || {})[:name]
|
60
|
+
assert_equal "Idaho Human Rights Day", (Holidays.on(Date.civil(2018, 1, 15), [:us_id])[0] || {})[:name]
|
61
|
+
|
62
|
+
assert_equal "Civil Rights Day", (Holidays.on(Date.civil(2016, 1, 18), [:us_ar])[0] || {})[:name]
|
63
|
+
assert_equal "Civil Rights Day", (Holidays.on(Date.civil(2017, 1, 16), [:us_ar])[0] || {})[:name]
|
64
|
+
assert_equal "Civil Rights Day", (Holidays.on(Date.civil(2018, 1, 15), [:us_ar])[0] || {})[:name]
|
65
|
+
|
66
|
+
assert_nil (Holidays.on(Date.civil(2017, 1, 20), [:us])[0] || {})[:name]
|
67
|
+
assert_nil (Holidays.on(Date.civil(2021, 1, 20), [:us])[0] || {})[:name]
|
68
|
+
|
69
|
+
assert_equal "Inauguration Day", (Holidays.on(Date.civil(2017, 1, 20), [:us_tx, :us_dc, :us_la, :us_md, :us_va])[0] || {})[:name]
|
70
|
+
assert_equal "Inauguration Day", (Holidays.on(Date.civil(2021, 1, 20), [:us_tx, :us_dc, :us_la, :us_md, :us_va])[0] || {})[:name]
|
71
|
+
|
72
|
+
assert_nil (Holidays.on(Date.civil(2017, 1, 13), [:us])[0] || {})[:name]
|
73
|
+
assert_nil (Holidays.on(Date.civil(2018, 1, 12), [:us])[0] || {})[:name]
|
74
|
+
assert_nil (Holidays.on(Date.civil(2019, 1, 18), [:us])[0] || {})[:name]
|
75
|
+
|
76
|
+
assert_equal "Lee-Jackson Day", (Holidays.on(Date.civil(2017, 1, 13), [:us_va])[0] || {})[:name]
|
77
|
+
assert_equal "Lee-Jackson Day", (Holidays.on(Date.civil(2018, 1, 12), [:us_va])[0] || {})[:name]
|
78
|
+
assert_equal "Lee-Jackson Day", (Holidays.on(Date.civil(2019, 1, 18), [:us_va])[0] || {})[:name]
|
79
|
+
|
80
|
+
assert_equal "Confederate Heroes Day", (Holidays.on(Date.civil(2017, 1, 19), [:us_tx])[0] || {})[:name]
|
81
|
+
|
82
|
+
assert_equal "Presidents' Day", (Holidays.on(Date.civil(2008, 2, 18), [:us])[0] || {})[:name]
|
83
|
+
assert_equal "Presidents' Day", (Holidays.on(Date.civil(2017, 2, 20), [:us])[0] || {})[:name]
|
84
|
+
assert_equal "Presidents' Day", (Holidays.on(Date.civil(2018, 2, 19), [:us])[0] || {})[:name]
|
85
|
+
|
86
|
+
assert_nil (Holidays.on(Date.civil(2017, 3, 6), [:us])[0] || {})[:name]
|
87
|
+
assert_nil (Holidays.on(Date.civil(2018, 3, 5), [:us])[0] || {})[:name]
|
88
|
+
assert_nil (Holidays.on(Date.civil(2019, 3, 4), [:us])[0] || {})[:name]
|
89
|
+
|
90
|
+
assert_nil (Holidays.on(Date.civil(2017, 3, 7), [:us])[0] || {})[:name]
|
91
|
+
assert_nil (Holidays.on(Date.civil(2018, 3, 6), [:us])[0] || {})[:name]
|
92
|
+
assert_nil (Holidays.on(Date.civil(2019, 3, 5), [:us])[0] || {})[:name]
|
93
|
+
|
94
|
+
assert_equal "Town Meeting Day", (Holidays.on(Date.civil(2017, 3, 7), [:us_vt])[0] || {})[:name]
|
95
|
+
assert_equal "Town Meeting Day", (Holidays.on(Date.civil(2018, 3, 6), [:us_vt])[0] || {})[:name]
|
96
|
+
assert_equal "Town Meeting Day", (Holidays.on(Date.civil(2019, 3, 5), [:us_vt])[0] || {})[:name]
|
97
|
+
|
98
|
+
assert_equal "Texas Independence Day", (Holidays.on(Date.civil(2017, 3, 2), [:us_tx])[0] || {})[:name]
|
99
|
+
|
100
|
+
assert_nil (Holidays.on(Date.civil(2017, 3, 27), [:us], [:observed])[0] || {})[:name]
|
101
|
+
assert_nil (Holidays.on(Date.civil(2018, 3, 26), [:us], [:observed])[0] || {})[:name]
|
102
|
+
assert_nil (Holidays.on(Date.civil(2022, 3, 25), [:us], [:observed])[0] || {})[:name]
|
103
|
+
|
104
|
+
assert_equal "Prince Jonah Kuhio Kalanianaole Day", (Holidays.on(Date.civil(2017, 3, 27), [:us_hi], [:observed])[0] || {})[:name]
|
105
|
+
assert_equal "Prince Jonah Kuhio Kalanianaole Day", (Holidays.on(Date.civil(2018, 3, 26), [:us_hi], [:observed])[0] || {})[:name]
|
106
|
+
assert_equal "Prince Jonah Kuhio Kalanianaole Day", (Holidays.on(Date.civil(2022, 3, 25), [:us_hi], [:observed])[0] || {})[:name]
|
107
|
+
|
108
|
+
assert_nil (Holidays.on(Date.civil(2017, 3, 26), [:us])[0] || {})[:name]
|
109
|
+
|
110
|
+
assert_equal "Prince Jonah Kuhio Kalanianaole Day", (Holidays.on(Date.civil(2017, 3, 26), [:us_hi])[0] || {})[:name]
|
111
|
+
|
112
|
+
assert_nil (Holidays.on(Date.civil(2017, 3, 27), [:us])[0] || {})[:name]
|
113
|
+
assert_nil (Holidays.on(Date.civil(2018, 3, 26), [:us])[0] || {})[:name]
|
114
|
+
assert_nil (Holidays.on(Date.civil(2019, 3, 25), [:us])[0] || {})[:name]
|
115
|
+
|
116
|
+
assert_equal "Seward's Day", (Holidays.on(Date.civil(2017, 3, 27), [:us_ak])[0] || {})[:name]
|
117
|
+
assert_equal "Seward's Day", (Holidays.on(Date.civil(2018, 3, 26), [:us_ak])[0] || {})[:name]
|
118
|
+
assert_equal "Seward's Day", (Holidays.on(Date.civil(2019, 3, 25), [:us_ak])[0] || {})[:name]
|
119
|
+
|
120
|
+
assert_equal "César Chávez Day", (Holidays.on(Date.civil(2017, 3, 31), [:us_ca])[0] || {})[:name]
|
121
|
+
|
122
|
+
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2023, 4, 17), [:us_dc, :us_ca], [:observed])[0] || {})[:name]
|
123
|
+
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2022, 4, 15), [:us_dc, :us_ca], [:observed])[0] || {})[:name]
|
124
|
+
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2028, 4, 17), [:us_dc, :us_ca], [:observed])[0] || {})[:name]
|
125
|
+
|
126
|
+
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2017, 4, 16), [:us_dc])[0] || {})[:name]
|
127
|
+
|
128
|
+
assert_nil (Holidays.on(Date.civil(2017, 4, 17), [:us])[0] || {})[:name]
|
129
|
+
assert_nil (Holidays.on(Date.civil(2018, 4, 16), [:us])[0] || {})[:name]
|
130
|
+
assert_nil (Holidays.on(Date.civil(2019, 4, 15), [:us])[0] || {})[:name]
|
131
|
+
|
132
|
+
assert_equal "Patriots' Day", (Holidays.on(Date.civil(2017, 4, 17), [:us_me, :us_ma])[0] || {})[:name]
|
133
|
+
assert_equal "Patriots' Day", (Holidays.on(Date.civil(2018, 4, 16), [:us_me, :us_ma])[0] || {})[:name]
|
134
|
+
assert_equal "Patriots' Day", (Holidays.on(Date.civil(2019, 4, 15), [:us_me, :us_ma])[0] || {})[:name]
|
135
|
+
|
136
|
+
assert_equal "San Jacinto Day", (Holidays.on(Date.civil(2017, 4, 21), [:us_tx])[0] || {})[:name]
|
137
|
+
|
138
|
+
assert_nil (Holidays.on(Date.civil(2017, 4, 24), [:us])[0] || {})[:name]
|
139
|
+
assert_nil (Holidays.on(Date.civil(2018, 4, 30), [:us])[0] || {})[:name]
|
140
|
+
assert_nil (Holidays.on(Date.civil(2019, 4, 29), [:us])[0] || {})[:name]
|
141
|
+
|
142
|
+
assert_equal "Confederate Memorial Day", (Holidays.on(Date.civil(2017, 4, 24), [:us_al, :us_ms])[0] || {})[:name]
|
143
|
+
assert_equal "Confederate Memorial Day", (Holidays.on(Date.civil(2018, 4, 30), [:us_al, :us_ms])[0] || {})[:name]
|
144
|
+
assert_equal "Confederate Memorial Day", (Holidays.on(Date.civil(2019, 4, 29), [:us_al, :us_ms])[0] || {})[:name]
|
145
|
+
|
146
|
+
assert_nil (Holidays.on(Date.civil(2015, 4, 27), [:us])[0] || {})[:name]
|
147
|
+
assert_nil (Holidays.on(Date.civil(2020, 4, 27), [:us])[0] || {})[:name]
|
148
|
+
assert_nil (Holidays.on(Date.civil(2026, 4, 27), [:us])[0] || {})[:name]
|
149
|
+
|
150
|
+
assert_equal "Confederate Memorial Day", (Holidays.on(Date.civil(2015, 4, 27), [:us_fl], [:observed])[0] || {})[:name]
|
151
|
+
assert_equal "Confederate Memorial Day", (Holidays.on(Date.civil(2020, 4, 27), [:us_fl], [:observed])[0] || {})[:name]
|
152
|
+
assert_equal "Confederate Memorial Day", (Holidays.on(Date.civil(2026, 4, 27), [:us_fl], [:observed])[0] || {})[:name]
|
153
|
+
|
154
|
+
assert_nil (Holidays.on(Date.civil(2017, 4, 26), [:us])[0] || {})[:name]
|
155
|
+
|
156
|
+
assert_equal "Confederate Memorial Day", (Holidays.on(Date.civil(2017, 4, 26), [:us_fl])[0] || {})[:name]
|
157
|
+
|
158
|
+
assert_nil (Holidays.on(Date.civil(2015, 4, 20), [:us])[0] || {})[:name]
|
159
|
+
assert_nil (Holidays.on(Date.civil(2021, 4, 26), [:us])[0] || {})[:name]
|
160
|
+
|
161
|
+
assert_equal "State Holiday", (Holidays.on(Date.civil(2015, 4, 20), [:us_ga])[0] || {})[:name]
|
162
|
+
assert_equal "State Holiday", (Holidays.on(Date.civil(2021, 4, 26), [:us_ga])[0] || {})[:name]
|
163
|
+
|
164
|
+
assert_equal "Arbor Day", (Holidays.on(Date.civil(2017, 4, 28), [:us_ne])[0] || {})[:name]
|
165
|
+
|
166
|
+
assert_equal "Truman Day", (Holidays.on(Date.civil(2017, 5, 8), [:us_mo])[0] || {})[:name]
|
167
|
+
|
168
|
+
assert_equal "Confederate Memorial Day", (Holidays.on(Date.civil(2017, 5, 10), [:us_sc])[0] || {})[:name]
|
169
|
+
|
170
|
+
assert_equal "Memorial Day", (Holidays.on(Date.civil(2017, 5, 29), [:us])[0] || {})[:name]
|
171
|
+
assert_equal "Memorial Day", (Holidays.on(Date.civil(2018, 5, 28), [:us])[0] || {})[:name]
|
172
|
+
assert_equal "Memorial Day", (Holidays.on(Date.civil(2019, 5, 27), [:us])[0] || {})[:name]
|
173
|
+
|
174
|
+
assert_nil (Holidays.on(Date.civil(2017, 6, 5), [:us])[0] || {})[:name]
|
175
|
+
assert_nil (Holidays.on(Date.civil(2018, 6, 4), [:us])[0] || {})[:name]
|
176
|
+
assert_nil (Holidays.on(Date.civil(2019, 6, 3), [:us])[0] || {})[:name]
|
177
|
+
|
178
|
+
assert_equal "Jefferson Davis' Birthday", (Holidays.on(Date.civil(2017, 6, 5), [:us_al])[0] || {})[:name]
|
179
|
+
assert_equal "Jefferson Davis' Birthday", (Holidays.on(Date.civil(2018, 6, 4), [:us_al])[0] || {})[:name]
|
180
|
+
assert_equal "Jefferson Davis' Birthday", (Holidays.on(Date.civil(2019, 6, 3), [:us_al])[0] || {})[:name]
|
181
|
+
|
182
|
+
assert_equal "Birthday of Jefferson Davis", (Holidays.on(Date.civil(2017, 6, 3), [:us_fl])[0] || {})[:name]
|
183
|
+
|
184
|
+
assert_nil (Holidays.on(Date.civil(2017, 6, 12), [:us])[0] || {})[:name]
|
185
|
+
assert_nil (Holidays.on(Date.civil(2018, 6, 11), [:us])[0] || {})[:name]
|
186
|
+
assert_nil (Holidays.on(Date.civil(2022, 6, 10), [:us])[0] || {})[:name]
|
187
|
+
|
188
|
+
assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2017, 6, 12), [:us_hi], [:observed])[0] || {})[:name]
|
189
|
+
assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2018, 6, 11), [:us_hi], [:observed])[0] || {})[:name]
|
190
|
+
assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2022, 6, 10), [:us_hi], [:observed])[0] || {})[:name]
|
191
|
+
|
192
|
+
assert_nil (Holidays.on(Date.civil(2017, 6, 11), [:us])[0] || {})[:name]
|
193
|
+
|
194
|
+
assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2017, 6, 11), [:us_hi])[0] || {})[:name]
|
195
|
+
|
196
|
+
assert_equal "Emancipation Day in Texas", (Holidays.on(Date.civil(2017, 6, 19), [:us_tx])[0] || {})[:name]
|
197
|
+
|
198
|
+
assert_nil (Holidays.on(Date.civil(2017, 6, 20), [:us])[0] || {})[:name]
|
199
|
+
assert_nil (Holidays.on(Date.civil(2020, 6, 19), [:us])[0] || {})[:name]
|
200
|
+
assert_nil (Holidays.on(Date.civil(2021, 6, 21), [:us])[0] || {})[:name]
|
201
|
+
|
202
|
+
assert_equal "West Virginia Day", (Holidays.on(Date.civil(2017, 6, 20), [:us_wv], [:observed])[0] || {})[:name]
|
203
|
+
assert_equal "West Virginia Day", (Holidays.on(Date.civil(2020, 6, 19), [:us_wv], [:observed])[0] || {})[:name]
|
204
|
+
assert_equal "West Virginia Day", (Holidays.on(Date.civil(2021, 6, 21), [:us_wv], [:observed])[0] || {})[:name]
|
205
|
+
|
206
|
+
assert_equal "West Virginia Day", (Holidays.on(Date.civil(2017, 6, 20), [:us_wv])[0] || {})[:name]
|
207
|
+
|
208
|
+
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2017, 7, 3), [:us_vi])[0] || {})[:name]
|
209
|
+
|
210
|
+
assert_equal "Independence Day", (Holidays.on(Date.civil(2020, 7, 4), [:us, :us_va])[0] || {})[:name]
|
211
|
+
assert_equal "Independence Day", (Holidays.on(Date.civil(2021, 7, 4), [:us, :us_va])[0] || {})[:name]
|
212
|
+
assert_equal "Independence Day", (Holidays.on(Date.civil(2026, 7, 4), [:us, :us_va])[0] || {})[:name]
|
213
|
+
|
214
|
+
assert_nil (Holidays.on(Date.civil(2020, 7, 3), [:us])[0] || {})[:name]
|
215
|
+
assert_nil (Holidays.on(Date.civil(2021, 7, 5), [:us])[0] || {})[:name]
|
216
|
+
assert_nil (Holidays.on(Date.civil(2026, 7, 3), [:us])[0] || {})[:name]
|
217
|
+
|
218
|
+
assert_equal "Independence Day (Holiday)", (Holidays.on(Date.civil(2020, 7, 3), [:us_va])[0] || {})[:name]
|
219
|
+
assert_equal "Independence Day (Holiday)", (Holidays.on(Date.civil(2021, 7, 5), [:us_va])[0] || {})[:name]
|
220
|
+
assert_equal "Independence Day (Holiday)", (Holidays.on(Date.civil(2026, 7, 3), [:us_va])[0] || {})[:name]
|
221
|
+
|
222
|
+
assert_equal "Pioneer Day", (Holidays.on(Date.civil(2020, 7, 24), [:us_ut])[0] || {})[:name]
|
223
|
+
|
224
|
+
assert_nil (Holidays.on(Date.civil(2017, 8, 14), [:us])[0] || {})[:name]
|
225
|
+
assert_nil (Holidays.on(Date.civil(2020, 8, 10), [:us])[0] || {})[:name]
|
226
|
+
assert_nil (Holidays.on(Date.civil(2021, 8, 9), [:us])[0] || {})[:name]
|
227
|
+
|
228
|
+
assert_equal "Victory Day", (Holidays.on(Date.civil(2017, 8, 14), [:us_ri])[0] || {})[:name]
|
229
|
+
assert_equal "Victory Day", (Holidays.on(Date.civil(2020, 8, 10), [:us_ri])[0] || {})[:name]
|
230
|
+
assert_equal "Victory Day", (Holidays.on(Date.civil(2021, 8, 9), [:us_ri])[0] || {})[:name]
|
231
|
+
|
232
|
+
assert_nil (Holidays.on(Date.civil(2017, 8, 16), [:us])[0] || {})[:name]
|
233
|
+
assert_nil (Holidays.on(Date.civil(2020, 8, 17), [:us])[0] || {})[:name]
|
234
|
+
assert_nil (Holidays.on(Date.civil(2025, 8, 15), [:us])[0] || {})[:name]
|
235
|
+
|
236
|
+
assert_equal "Bennington Battle Day", (Holidays.on(Date.civil(2017, 8, 16), [:us_vt], [:observed])[0] || {})[:name]
|
237
|
+
assert_equal "Bennington Battle Day", (Holidays.on(Date.civil(2020, 8, 17), [:us_vt], [:observed])[0] || {})[:name]
|
238
|
+
assert_equal "Bennington Battle Day", (Holidays.on(Date.civil(2025, 8, 15), [:us_vt], [:observed])[0] || {})[:name]
|
239
|
+
|
240
|
+
assert_equal "Bennington Battle Day", (Holidays.on(Date.civil(2017, 8, 16), [:us_vt])[0] || {})[:name]
|
241
|
+
|
242
|
+
assert_nil (Holidays.on(Date.civil(2017, 8, 18), [:us])[0] || {})[:name]
|
243
|
+
assert_nil (Holidays.on(Date.civil(2020, 8, 21), [:us])[0] || {})[:name]
|
244
|
+
assert_nil (Holidays.on(Date.civil(2025, 8, 15), [:us])[0] || {})[:name]
|
245
|
+
|
246
|
+
assert_equal "Statehood Day", (Holidays.on(Date.civil(2017, 8, 18), [:us_hi])[0] || {})[:name]
|
247
|
+
assert_equal "Statehood Day", (Holidays.on(Date.civil(2020, 8, 21), [:us_hi])[0] || {})[:name]
|
248
|
+
assert_equal "Statehood Day", (Holidays.on(Date.civil(2025, 8, 15), [:us_hi])[0] || {})[:name]
|
249
|
+
|
250
|
+
assert_equal "Lyndon Baines Johnson Day", (Holidays.on(Date.civil(2017, 8, 27), [:us_tx])[0] || {})[:name]
|
251
|
+
|
252
|
+
assert_equal "Labor Day", (Holidays.on(Date.civil(2017, 9, 4), [:us])[0] || {})[:name]
|
253
|
+
assert_equal "Labor Day", (Holidays.on(Date.civil(2018, 9, 3), [:us])[0] || {})[:name]
|
254
|
+
assert_equal "Labor Day", (Holidays.on(Date.civil(2019, 9, 2), [:us])[0] || {})[:name]
|
255
|
+
|
256
|
+
assert_nil (Holidays.on(Date.civil(2017, 9, 21), [:us])[0] || {})[:name]
|
257
|
+
assert_nil (Holidays.on(Date.civil(2018, 9, 10), [:us])[0] || {})[:name]
|
258
|
+
assert_nil (Holidays.on(Date.civil(2019, 9, 30), [:us])[0] || {})[:name]
|
259
|
+
|
260
|
+
assert_equal "Rosh Hashanah", (Holidays.on(Date.civil(2017, 9, 21), [:us_tx])[0] || {})[:name]
|
261
|
+
assert_equal "Rosh Hashanah", (Holidays.on(Date.civil(2018, 9, 10), [:us_tx])[0] || {})[:name]
|
262
|
+
assert_equal "Rosh Hashanah", (Holidays.on(Date.civil(2019, 9, 30), [:us_tx])[0] || {})[:name]
|
263
|
+
|
264
|
+
assert_nil (Holidays.on(Date.civil(2017, 9, 30), [:us])[0] || {})[:name]
|
265
|
+
assert_nil (Holidays.on(Date.civil(2018, 9, 19), [:us])[0] || {})[:name]
|
266
|
+
assert_nil (Holidays.on(Date.civil(2019, 10, 9), [:us])[0] || {})[:name]
|
267
|
+
|
268
|
+
assert_equal "Yom Kippur", (Holidays.on(Date.civil(2017, 9, 30), [:us_tx])[0] || {})[:name]
|
269
|
+
assert_equal "Yom Kippur", (Holidays.on(Date.civil(2018, 9, 19), [:us_tx])[0] || {})[:name]
|
270
|
+
assert_equal "Yom Kippur", (Holidays.on(Date.civil(2019, 10, 9), [:us_tx])[0] || {})[:name]
|
271
|
+
|
272
|
+
assert_nil (Holidays.on(Date.civil(2017, 10, 9), [:us])[0] || {})[:name]
|
273
|
+
assert_nil (Holidays.on(Date.civil(2018, 10, 8), [:us])[0] || {})[:name]
|
274
|
+
assert_nil (Holidays.on(Date.civil(2019, 10, 14), [:us])[0] || {})[:name]
|
275
|
+
|
276
|
+
assert_equal "Columbus Day", (Holidays.on(Date.civil(2017, 10, 9), [: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])[0] || {})[:name]
|
277
|
+
assert_equal "Columbus Day", (Holidays.on(Date.civil(2018, 10, 8), [: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])[0] || {})[:name]
|
278
|
+
assert_equal "Columbus Day", (Holidays.on(Date.civil(2019, 10, 14), [: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])[0] || {})[:name]
|
279
|
+
|
280
|
+
assert_equal "Columbus Day", (Holidays.on(Date.civil(2017, 10, 9), [: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], [:informal])[0] || {})[:name]
|
281
|
+
assert_equal "Columbus Day", (Holidays.on(Date.civil(2018, 10, 8), [: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], [:informal])[0] || {})[:name]
|
282
|
+
assert_equal "Columbus Day", (Holidays.on(Date.civil(2019, 10, 14), [: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], [:informal])[0] || {})[:name]
|
283
|
+
|
284
|
+
assert_nil (Holidays.on(Date.civil(2017, 10, 9), [: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])[0] || {})[:name]
|
285
|
+
assert_nil (Holidays.on(Date.civil(2018, 10, 8), [: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])[0] || {})[:name]
|
286
|
+
assert_nil (Holidays.on(Date.civil(2019, 10, 14), [: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])[0] || {})[:name]
|
287
|
+
|
288
|
+
assert_equal "Alaska Day", (Holidays.on(Date.civil(2017, 10, 18), [:us_ak])[0] || {})[:name]
|
289
|
+
|
290
|
+
assert_nil (Holidays.on(Date.civil(2017, 10, 27), [:us])[0] || {})[:name]
|
291
|
+
assert_nil (Holidays.on(Date.civil(2018, 10, 26), [:us])[0] || {})[:name]
|
292
|
+
assert_nil (Holidays.on(Date.civil(2019, 10, 25), [:us])[0] || {})[:name]
|
293
|
+
|
294
|
+
assert_equal "Nevada Day", (Holidays.on(Date.civil(2017, 10, 27), [:us_nv])[0] || {})[:name]
|
295
|
+
assert_equal "Nevada Day", (Holidays.on(Date.civil(2018, 10, 26), [:us_nv])[0] || {})[:name]
|
296
|
+
assert_equal "Nevada Day", (Holidays.on(Date.civil(2019, 10, 25), [:us_nv])[0] || {})[:name]
|
297
|
+
|
298
|
+
assert_nil (Holidays.on(Date.civil(2017, 11, 7), [:us])[0] || {})[:name]
|
299
|
+
assert_nil (Holidays.on(Date.civil(2018, 11, 6), [:us])[0] || {})[:name]
|
300
|
+
assert_nil (Holidays.on(Date.civil(2021, 11, 2), [:us])[0] || {})[:name]
|
301
|
+
|
302
|
+
assert_equal "Election Day", (Holidays.on(Date.civil(2017, 11, 7), [:us_de, :us_hi, :us_in, :us_mt, :us_nj, :us_ny, :us_pa, :us_ri])[0] || {})[:name]
|
303
|
+
assert_equal "Election Day", (Holidays.on(Date.civil(2018, 11, 6), [:us_de, :us_hi, :us_in, :us_mt, :us_nj, :us_ny, :us_pa, :us_ri])[0] || {})[:name]
|
304
|
+
assert_equal "Election Day", (Holidays.on(Date.civil(2021, 11, 2), [:us_de, :us_hi, :us_in, :us_mt, :us_nj, :us_ny, :us_pa, :us_ri])[0] || {})[:name]
|
305
|
+
|
306
|
+
assert_equal "Veterans Day", (Holidays.on(Date.civil(2017, 11, 10), [:us], [:observed])[0] || {})[:name]
|
307
|
+
assert_equal "Veterans Day", (Holidays.on(Date.civil(2018, 11, 12), [:us], [:observed])[0] || {})[:name]
|
308
|
+
assert_equal "Veterans Day", (Holidays.on(Date.civil(2019, 11, 11), [:us], [:observed])[0] || {})[:name]
|
309
|
+
|
310
|
+
assert_equal "Veterans Day", (Holidays.on(Date.civil(2017, 11, 11), [:us])[0] || {})[:name]
|
311
|
+
|
312
|
+
assert_equal "Thanksgiving", (Holidays.on(Date.civil(2017, 11, 23), [:us])[0] || {})[:name]
|
313
|
+
assert_equal "Thanksgiving", (Holidays.on(Date.civil(2018, 11, 22), [:us])[0] || {})[:name]
|
314
|
+
assert_equal "Thanksgiving", (Holidays.on(Date.civil(2019, 11, 28), [:us])[0] || {})[:name]
|
315
|
+
|
316
|
+
assert_nil (Holidays.on(Date.civil(2017, 11, 24), [:us])[0] || {})[:name]
|
317
|
+
assert_nil (Holidays.on(Date.civil(2018, 11, 23), [:us])[0] || {})[:name]
|
318
|
+
assert_nil (Holidays.on(Date.civil(2019, 11, 29), [:us])[0] || {})[:name]
|
319
|
+
|
320
|
+
assert_equal "Family Day", (Holidays.on(Date.civil(2017, 11, 24), [:us_nv])[0] || {})[:name]
|
321
|
+
assert_equal "Family Day", (Holidays.on(Date.civil(2018, 11, 23), [:us_nv])[0] || {})[:name]
|
322
|
+
assert_equal "Family Day", (Holidays.on(Date.civil(2019, 11, 29), [:us_nv])[0] || {})[:name]
|
323
|
+
|
324
|
+
assert_equal "State Holiday", (Holidays.on(Date.civil(2017, 11, 24), [:us_ga])[0] || {})[:name]
|
325
|
+
assert_equal "State Holiday", (Holidays.on(Date.civil(2018, 11, 23), [:us_ga])[0] || {})[:name]
|
326
|
+
assert_equal "State Holiday", (Holidays.on(Date.civil(2019, 11, 29), [:us_ga])[0] || {})[:name]
|
327
|
+
|
328
|
+
assert_equal "Presidents' Day", (Holidays.on(Date.civil(2017, 11, 24), [:us_nm])[0] || {})[:name]
|
329
|
+
assert_equal "Presidents' Day", (Holidays.on(Date.civil(2018, 11, 23), [:us_nm])[0] || {})[:name]
|
330
|
+
assert_equal "Presidents' Day", (Holidays.on(Date.civil(2019, 11, 29), [:us_nm])[0] || {})[:name]
|
331
|
+
|
332
|
+
assert_equal "Lincoln's Birthday", (Holidays.on(Date.civil(2017, 11, 24), [:us_in])[0] || {})[:name]
|
333
|
+
assert_equal "Lincoln's Birthday", (Holidays.on(Date.civil(2018, 11, 23), [:us_in])[0] || {})[:name]
|
334
|
+
assert_equal "Lincoln's Birthday", (Holidays.on(Date.civil(2019, 11, 29), [:us_in])[0] || {})[:name]
|
335
|
+
|
336
|
+
assert_equal "American Indian Heritage Day", (Holidays.on(Date.civil(2017, 11, 24), [:us_md])[0] || {})[:name]
|
337
|
+
assert_equal "American Indian Heritage Day", (Holidays.on(Date.civil(2018, 11, 23), [:us_md])[0] || {})[:name]
|
338
|
+
assert_equal "American Indian Heritage Day", (Holidays.on(Date.civil(2019, 11, 29), [:us_md])[0] || {})[:name]
|
339
|
+
|
340
|
+
assert_equal "Day after Thanksgiving (Black Friday)", (Holidays.on(Date.civil(2017, 11, 24), [: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])[0] || {})[:name]
|
341
|
+
assert_equal "Day after Thanksgiving (Black Friday)", (Holidays.on(Date.civil(2018, 11, 23), [: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])[0] || {})[:name]
|
342
|
+
assert_equal "Day after Thanksgiving (Black Friday)", (Holidays.on(Date.civil(2019, 11, 29), [: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])[0] || {})[:name]
|
343
|
+
|
344
|
+
assert_equal "Christmas Eve (Holiday)", (Holidays.on(Date.civil(2022, 12, 23), [:us_mi, :us_sc, :us_va])[0] || {})[:name]
|
345
|
+
assert_equal "Christmas Eve (Holiday)", (Holidays.on(Date.civil(2023, 12, 22), [:us_mi, :us_sc, :us_va])[0] || {})[:name]
|
346
|
+
assert_equal "Christmas Eve (Holiday)", (Holidays.on(Date.civil(2028, 12, 22), [:us_mi, :us_sc, :us_va])[0] || {})[:name]
|
347
|
+
|
348
|
+
assert_equal "Christmas Eve", (Holidays.on(Date.civil(2017, 12, 24), [:us_ar, :us_mi, :us_nc, :us_va, :us_sc, :us_tx, :us_wi])[0] || {})[:name]
|
349
|
+
|
350
|
+
assert_nil (Holidays.on(Date.civil(2021, 12, 27), [:us])[0] || {})[:name]
|
351
|
+
assert_nil (Holidays.on(Date.civil(2022, 12, 26), [:us])[0] || {})[:name]
|
352
|
+
assert_nil (Holidays.on(Date.civil(2027, 12, 27), [:us])[0] || {})[:name]
|
353
|
+
|
354
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:us], [:observed])[0] || {})[:name]
|
355
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:us], [:observed])[0] || {})[:name]
|
356
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2027, 12, 24), [:us], [:observed])[0] || {})[:name]
|
357
|
+
|
358
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2017, 12, 25), [:us])[0] || {})[:name]
|
359
|
+
|
360
|
+
assert_equal "Day after Christmas", (Holidays.on(Date.civil(2017, 12, 26), [:us_ar, :us_nc, :us_ok, :us_sc, :us_tn, :us_tx])[0] || {})[:name]
|
361
|
+
|
362
|
+
assert_equal "New Year's Eve", (Holidays.on(Date.civil(2017, 12, 31), [:us_mi, :us_wi])[0] || {})[:name]
|
363
|
+
|
364
|
+
assert_equal "Groundhog Day", (Holidays.on(Date.civil(2013, 2, 2), [:us], [:informal])[0] || {})[:name]
|
365
|
+
|
366
|
+
assert_equal "Valentine's Day", (Holidays.on(Date.civil(2013, 2, 14), [:us], [:informal])[0] || {})[:name]
|
367
|
+
|
368
|
+
assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2013, 3, 17), [:us], [:informal])[0] || {})[:name]
|
369
|
+
|
370
|
+
assert_equal "April Fool's Day", (Holidays.on(Date.civil(2013, 4, 1), [:us], [:informal])[0] || {})[:name]
|
371
|
+
|
372
|
+
assert_equal "Earth Day", (Holidays.on(Date.civil(2013, 4, 22), [:us], [:informal])[0] || {})[:name]
|
373
|
+
|
374
|
+
assert_equal "Mother's Day", (Holidays.on(Date.civil(2013, 5, 12), [:us], [:informal])[0] || {})[:name]
|
375
|
+
|
376
|
+
assert_equal "Armed Forces Day", (Holidays.on(Date.civil(2013, 5, 18), [:us], [:informal])[0] || {})[:name]
|
377
|
+
|
378
|
+
assert_equal "Father's Day", (Holidays.on(Date.civil(2013, 6, 16), [:us], [:informal])[0] || {})[:name]
|
379
|
+
|
380
|
+
assert_equal "Halloween", (Holidays.on(Date.civil(2013, 10, 31), [:us], [:informal])[0] || {})[:name]
|
41
381
|
|
42
382
|
end
|
43
383
|
end
|
data/test/defs/test_defs_ve.rb
CHANGED
@@ -7,22 +7,29 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
7
7
|
class VeDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_ve
|
10
|
-
{
|
11
|
-
|
12
|
-
Date.civil(2013, 2, 11)
|
13
|
-
|
14
|
-
Date.civil(2013,
|
15
|
-
|
16
|
-
Date.civil(2013,
|
17
|
-
|
18
|
-
Date.civil(2013,
|
19
|
-
|
20
|
-
Date.civil(2013,
|
21
|
-
|
22
|
-
Date.civil(2013,
|
23
|
-
|
24
|
-
|
25
|
-
|
10
|
+
assert_equal "Año Nuevo", (Holidays.on(Date.civil(2013, 1, 1), [:ve])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Lunes Carnaval", (Holidays.on(Date.civil(2013, 2, 11), [:ve])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Martes Carnaval", (Holidays.on(Date.civil(2013, 2, 12), [:ve])[0] || {})[:name]
|
15
|
+
|
16
|
+
assert_equal "Jueves Santo", (Holidays.on(Date.civil(2013, 3, 28), [:ve])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Viernes Santo", (Holidays.on(Date.civil(2013, 3, 29), [:ve])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Declaración Independencia", (Holidays.on(Date.civil(2013, 4, 19), [:ve])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "Día del Trabajador", (Holidays.on(Date.civil(2013, 5, 1), [:ve])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "Aniversario Batalla de Carabobo", (Holidays.on(Date.civil(2013, 6, 24), [:ve])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2013, 7, 5), [:ve])[0] || {})[:name]
|
27
|
+
|
28
|
+
assert_equal "Natalicio de Simón Bolívar", (Holidays.on(Date.civil(2013, 7, 24), [:ve])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_equal "Día de la Resistencia Indígena", (Holidays.on(Date.civil(2013, 10, 12), [:ve])[0] || {})[:name]
|
31
|
+
|
32
|
+
assert_equal "Día de Navidad", (Holidays.on(Date.civil(2013, 12, 25), [:ve])[0] || {})[:name]
|
26
33
|
|
27
34
|
end
|
28
35
|
end
|