revised_holidays 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/workflows/ruby.yml +25 -0
- data/CHANGELOG.md +446 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/Makefile +45 -0
- data/README.md +337 -0
- data/Rakefile +109 -0
- data/bin/console +7 -0
- data/bin/setup +6 -0
- data/definitions/.github/workflows/ruby.yml +25 -0
- data/definitions/.gitignore +5 -0
- data/definitions/CHANGELOG.md +352 -0
- data/definitions/Gemfile +6 -0
- data/definitions/LICENSE +21 -0
- data/definitions/METHODS.yml +26 -0
- data/definitions/Makefile +9 -0
- data/definitions/README.md +22 -0
- data/definitions/ar.yaml +268 -0
- data/definitions/at.yaml +116 -0
- data/definitions/au.yaml +907 -0
- data/definitions/be_fr.yaml +153 -0
- data/definitions/be_nl.yaml +153 -0
- data/definitions/bg.yaml +186 -0
- data/definitions/br.yaml +178 -0
- data/definitions/ca.yaml +969 -0
- data/definitions/ch.yaml +277 -0
- data/definitions/cl.yaml +294 -0
- data/definitions/co.yaml +437 -0
- data/definitions/cr.yaml +100 -0
- data/definitions/cz.yaml +137 -0
- data/definitions/de.yaml +401 -0
- data/definitions/dk.yaml +220 -0
- data/definitions/doc/CONTRIBUTING.md +44 -0
- data/definitions/doc/MAINTAINERS.md +39 -0
- data/definitions/doc/SYNTAX.md +435 -0
- data/definitions/doc/architecture/README.md +15 -0
- data/definitions/doc/architecture/adr-001.md +86 -0
- data/definitions/doc/architecture/adr-002.md +64 -0
- data/definitions/ecbtarget.yaml +74 -0
- data/definitions/ee.yaml +123 -0
- data/definitions/es.yaml +495 -0
- data/definitions/federalreserve.yaml +389 -0
- data/definitions/federalreservebanks.yaml +821 -0
- data/definitions/fedex.yaml +102 -0
- data/definitions/fi.yaml +234 -0
- data/definitions/fr.yaml +157 -0
- data/definitions/gb.yaml +565 -0
- data/definitions/ge.yaml +158 -0
- data/definitions/gr.yaml +158 -0
- data/definitions/hk.yaml +287 -0
- data/definitions/hr.yaml +171 -0
- data/definitions/hu.yaml +156 -0
- data/definitions/ie.yaml +172 -0
- data/definitions/index.yaml +80 -0
- data/definitions/is.yaml +247 -0
- data/definitions/it.yaml +246 -0
- data/definitions/jp.yaml +761 -0
- data/definitions/ke.yaml +107 -0
- data/definitions/kr.yaml +166 -0
- data/definitions/kz.yaml +128 -0
- data/definitions/li.yaml +154 -0
- data/definitions/lib/validation/custom_method_validator.rb +38 -0
- data/definitions/lib/validation/definition_validator.rb +35 -0
- data/definitions/lib/validation/error.rb +11 -0
- data/definitions/lib/validation/month_validator.rb +58 -0
- data/definitions/lib/validation/run.rb +66 -0
- data/definitions/lib/validation/test_validator.rb +83 -0
- data/definitions/lt.yaml +198 -0
- data/definitions/lu.yaml +123 -0
- data/definitions/lv.yaml +229 -0
- data/definitions/ma.yaml +96 -0
- data/definitions/mt_en.yaml +131 -0
- data/definitions/mt_mt.yaml +131 -0
- data/definitions/mx.yaml +160 -0
- data/definitions/my.yaml +79 -0
- data/definitions/nerc.yaml +94 -0
- data/definitions/ng.yaml +97 -0
- data/definitions/nl.yaml +127 -0
- data/definitions/no.yaml +169 -0
- data/definitions/northamericainformal.yaml +105 -0
- data/definitions/nyse.yaml +137 -0
- data/definitions/nz.yaml +346 -0
- data/definitions/pe.yaml +208 -0
- data/definitions/ph.yaml +130 -0
- data/definitions/pl.yaml +796 -0
- data/definitions/pt.yaml +187 -0
- data/definitions/ro.yaml +240 -0
- data/definitions/rs_cyrl.yaml +129 -0
- data/definitions/rs_la.yaml +129 -0
- data/definitions/ru.yaml +108 -0
- data/definitions/se.yaml +238 -0
- data/definitions/sg.yaml +89 -0
- data/definitions/si.yaml +162 -0
- data/definitions/sk.yaml +154 -0
- data/definitions/spec/coverage_report.rb +7 -0
- data/definitions/spec/data/invalid/months/malformed/bad.yaml +15 -0
- data/definitions/spec/data/invalid/months/missing/no_months.yaml +9 -0
- data/definitions/spec/data/valid/simple.yaml +15 -0
- data/definitions/spec/spec_helper.rb +7 -0
- data/definitions/spec/validation/custom_method_validator_spec.rb +60 -0
- data/definitions/spec/validation/definition_validator_spec.rb +43 -0
- data/definitions/spec/validation/month_validator_spec.rb +175 -0
- data/definitions/spec/validation/test_validator_spec.rb +169 -0
- data/definitions/th.yaml +111 -0
- data/definitions/tn.yaml +83 -0
- data/definitions/tr.yaml +174 -0
- data/definitions/ua.yaml +161 -0
- data/definitions/unitednations.yaml +189 -0
- data/definitions/ups.yaml +102 -0
- data/definitions/us.yaml +965 -0
- data/definitions/ve.yaml +118 -0
- data/definitions/vi.yaml +54 -0
- data/definitions/za.yaml +139 -0
- data/doc/CONTRIBUTING.md +72 -0
- data/doc/MAINTAINERS.md +81 -0
- data/doc/REFERENCES +19 -0
- data/lib/generated_definitions/MANIFEST +83 -0
- data/lib/generated_definitions/REGIONS.rb +6 -0
- data/lib/generated_definitions/ar.rb +60 -0
- data/lib/generated_definitions/at.rb +37 -0
- data/lib/generated_definitions/au.rb +177 -0
- data/lib/generated_definitions/be.rb +42 -0
- data/lib/generated_definitions/be_fr.rb +36 -0
- data/lib/generated_definitions/be_nl.rb +36 -0
- data/lib/generated_definitions/bg.rb +53 -0
- data/lib/generated_definitions/br.rb +37 -0
- data/lib/generated_definitions/ca.rb +88 -0
- data/lib/generated_definitions/ch.rb +95 -0
- data/lib/generated_definitions/cl.rb +71 -0
- data/lib/generated_definitions/co.rb +121 -0
- data/lib/generated_definitions/cr.rb +35 -0
- data/lib/generated_definitions/cz.rb +37 -0
- data/lib/generated_definitions/de.rb +65 -0
- data/lib/generated_definitions/dk.rb +48 -0
- data/lib/generated_definitions/ecbtarget.rb +30 -0
- data/lib/generated_definitions/ee.rb +36 -0
- data/lib/generated_definitions/el.rb +38 -0
- data/lib/generated_definitions/es.rb +56 -0
- data/lib/generated_definitions/europe.rb +638 -0
- data/lib/generated_definitions/federalreserve.rb +35 -0
- data/lib/generated_definitions/federalreservebanks.rb +35 -0
- data/lib/generated_definitions/fedex.rb +36 -0
- data/lib/generated_definitions/fi.rb +61 -0
- data/lib/generated_definitions/fr.rb +39 -0
- data/lib/generated_definitions/gb.rb +51 -0
- data/lib/generated_definitions/ge.rb +41 -0
- data/lib/generated_definitions/gr.rb +38 -0
- data/lib/generated_definitions/hk.rb +106 -0
- data/lib/generated_definitions/hr.rb +40 -0
- data/lib/generated_definitions/hu.rb +35 -0
- data/lib/generated_definitions/ie.rb +33 -0
- data/lib/generated_definitions/is.rb +60 -0
- data/lib/generated_definitions/it.rb +45 -0
- data/lib/generated_definitions/jp.rb +166 -0
- data/lib/generated_definitions/ke.rb +34 -0
- data/lib/generated_definitions/kr.rb +40 -0
- data/lib/generated_definitions/kz.rb +38 -0
- data/lib/generated_definitions/li.rb +44 -0
- data/lib/generated_definitions/lt.rb +38 -0
- data/lib/generated_definitions/lu.rb +35 -0
- data/lib/generated_definitions/lv.rb +56 -0
- data/lib/generated_definitions/ma.rb +33 -0
- data/lib/generated_definitions/mt_en.rb +38 -0
- data/lib/generated_definitions/mt_mt.rb +38 -0
- data/lib/generated_definitions/mx.rb +54 -0
- data/lib/generated_definitions/my.rb +30 -0
- data/lib/generated_definitions/nerc.rb +30 -0
- data/lib/generated_definitions/ng.rb +33 -0
- data/lib/generated_definitions/nl.rb +37 -0
- data/lib/generated_definitions/no.rb +40 -0
- data/lib/generated_definitions/northamerica.rb +229 -0
- data/lib/generated_definitions/nyse.rb +34 -0
- data/lib/generated_definitions/nz.rb +105 -0
- data/lib/generated_definitions/pe.rb +43 -0
- data/lib/generated_definitions/ph.rb +50 -0
- data/lib/generated_definitions/pl.rb +73 -0
- data/lib/generated_definitions/pt.rb +40 -0
- data/lib/generated_definitions/ro.rb +39 -0
- 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 +166 -0
- data/lib/generated_definitions/se.rb +53 -0
- data/lib/generated_definitions/sg.rb +31 -0
- data/lib/generated_definitions/si.rb +39 -0
- data/lib/generated_definitions/sk.rb +39 -0
- data/lib/generated_definitions/southamerica.rb +248 -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/unitednations.rb +81 -0
- data/lib/generated_definitions/ups.rb +36 -0
- data/lib/generated_definitions/us.rb +153 -0
- data/lib/generated_definitions/ve.rb +36 -0
- data/lib/generated_definitions/vi.rb +29 -0
- data/lib/generated_definitions/za.rb +36 -0
- data/lib/holidays/core_extensions/date.rb +57 -0
- data/lib/holidays/core_extensions/time.rb +23 -0
- data/lib/holidays/date_calculator/day_of_month.rb +68 -0
- data/lib/holidays/date_calculator/easter.rb +91 -0
- data/lib/holidays/date_calculator/lunar_date.rb +371 -0
- data/lib/holidays/date_calculator/weekend_modifier.rb +80 -0
- data/lib/holidays/definition/context/function_processor.rb +91 -0
- data/lib/holidays/definition/context/generator.rb +209 -0
- data/lib/holidays/definition/context/load.rb +29 -0
- data/lib/holidays/definition/context/merger.rb +22 -0
- data/lib/holidays/definition/decorator/custom_method_proc.rb +28 -0
- data/lib/holidays/definition/decorator/custom_method_source.rb +30 -0
- data/lib/holidays/definition/decorator/test.rb +37 -0
- data/lib/holidays/definition/entity/custom_method.rb +11 -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 +67 -0
- data/lib/holidays/definition/parser/test.rb +86 -0
- data/lib/holidays/definition/repository/cache.rb +47 -0
- data/lib/holidays/definition/repository/custom_methods.rb +27 -0
- data/lib/holidays/definition/repository/holidays_by_month.rb +57 -0
- data/lib/holidays/definition/repository/proc_result_cache.rb +51 -0
- data/lib/holidays/definition/repository/regions.rb +46 -0
- data/lib/holidays/definition/validator/custom_method.rb +31 -0
- data/lib/holidays/definition/validator/region.rb +36 -0
- data/lib/holidays/definition/validator/test.rb +71 -0
- data/lib/holidays/errors.rb +11 -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/finder/context/dates_driver_builder.rb +64 -0
- 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 +111 -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 +56 -0
- data/lib/holidays/version.rb +3 -0
- data/lib/holidays.rb +130 -0
- data/lib/revised_holidays.rb +1 -0
- data/revised_holidays.gemspec +31 -0
- data/test/coverage_report.rb +26 -0
- data/test/data/test_custom_govt_holiday_defs.yaml +5 -0
- data/test/data/test_custom_informal_holidays_defs.yaml +11 -0
- data/test/data/test_custom_year_range_holiday_defs.yaml +31 -0
- data/test/data/test_invalid_region.rb +15 -0
- data/test/data/test_multiple_custom_holiday_defs.yaml +12 -0
- 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 +12 -0
- data/test/data/test_single_custom_holiday_with_custom_procs.yaml +28 -0
- data/test/defs/test_defs_ar.rb +69 -0
- data/test/defs/test_defs_at.rb +31 -0
- data/test/defs/test_defs_au.rb +233 -0
- data/test/defs/test_defs_be_fr.rb +45 -0
- data/test/defs/test_defs_be_nl.rb +45 -0
- data/test/defs/test_defs_bg.rb +41 -0
- data/test/defs/test_defs_br.rb +49 -0
- data/test/defs/test_defs_ca.rb +289 -0
- data/test/defs/test_defs_ch.rb +51 -0
- data/test/defs/test_defs_cl.rb +69 -0
- data/test/defs/test_defs_co.rb +113 -0
- data/test/defs/test_defs_cr.rb +29 -0
- data/test/defs/test_defs_cz.rb +37 -0
- data/test/defs/test_defs_de.rb +89 -0
- data/test/defs/test_defs_dk.rb +47 -0
- data/test/defs/test_defs_ecbtarget.rb +27 -0
- data/test/defs/test_defs_ee.rb +41 -0
- data/test/defs/test_defs_es.rb +137 -0
- data/test/defs/test_defs_europe.rb +1522 -0
- data/test/defs/test_defs_fed_ex.rb +24 -0
- data/test/defs/test_defs_federalreserve.rb +119 -0
- data/test/defs/test_defs_federalreservebanks.rb +251 -0
- data/test/defs/test_defs_fedex.rb +31 -0
- data/test/defs/test_defs_fi.rb +59 -0
- data/test/defs/test_defs_fr.rb +43 -0
- data/test/defs/test_defs_gb.rb +159 -0
- data/test/defs/test_defs_ge.rb +53 -0
- data/test/defs/test_defs_gr.rb +41 -0
- data/test/defs/test_defs_hk.rb +59 -0
- data/test/defs/test_defs_hr.rb +45 -0
- data/test/defs/test_defs_hu.rb +47 -0
- data/test/defs/test_defs_ie.rb +53 -0
- data/test/defs/test_defs_is.rb +51 -0
- data/test/defs/test_defs_it.rb +55 -0
- data/test/defs/test_defs_jp.rb +159 -0
- data/test/defs/test_defs_ke.rb +31 -0
- 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 +35 -0
- data/test/defs/test_defs_lt.rb +65 -0
- data/test/defs/test_defs_lu.rb +35 -0
- data/test/defs/test_defs_lv.rb +98 -0
- data/test/defs/test_defs_ma.rb +29 -0
- 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 +49 -0
- data/test/defs/test_defs_my.rb +23 -0
- data/test/defs/test_defs_nerc.rb +29 -0
- data/test/defs/test_defs_ng.rb +29 -0
- data/test/defs/test_defs_nl.rb +33 -0
- data/test/defs/test_defs_no.rb +43 -0
- data/test/defs/test_defs_northamerica.rb +667 -0
- data/test/defs/test_defs_nyse.rb +46 -0
- data/test/defs/test_defs_nz.rb +67 -0
- data/test/defs/test_defs_pe.rb +47 -0
- data/test/defs/test_defs_ph.rb +29 -0
- data/test/defs/test_defs_pl.rb +229 -0
- data/test/defs/test_defs_pt.rb +47 -0
- data/test/defs/test_defs_ro.rb +65 -0
- 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 +215 -0
- data/test/defs/test_defs_se.rb +59 -0
- data/test/defs/test_defs_sg.rb +25 -0
- data/test/defs/test_defs_si.rb +105 -0
- data/test/defs/test_defs_sk.rb +41 -0
- data/test/defs/test_defs_southamerica.rb +327 -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_unitednations.rb +11 -0
- data/test/defs/test_defs_ups.rb +31 -0
- data/test/defs/test_defs_us.rb +387 -0
- data/test/defs/test_defs_ve.rb +35 -0
- data/test/defs/test_defs_vi.rb +22 -0
- data/test/defs/test_defs_za.rb +35 -0
- data/test/holidays/core_extensions/test_date.rb +122 -0
- data/test/holidays/core_extensions/test_date_time.rb +60 -0
- data/test/holidays/date_calculator/test_day_of_month.rb +27 -0
- data/test/holidays/date_calculator/test_easter_gregorian.rb +30 -0
- data/test/holidays/date_calculator/test_easter_julian.rb +36 -0
- data/test/holidays/date_calculator/test_lunar_date.rb +89 -0
- data/test/holidays/date_calculator/test_weekend_modifier.rb +54 -0
- data/test/holidays/definition/context/test_function_processor.rb +199 -0
- data/test/holidays/definition/context/test_generator.rb +226 -0
- data/test/holidays/definition/context/test_load.rb +37 -0
- data/test/holidays/definition/context/test_merger.rb +25 -0
- data/test/holidays/definition/decorator/test_custom_method_proc.rb +113 -0
- data/test/holidays/definition/decorator/test_custom_method_source.rb +96 -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 +79 -0
- data/test/holidays/definition/parser/test_test.rb +142 -0
- data/test/holidays/definition/repository/test_cache.rb +123 -0
- data/test/holidays/definition/repository/test_custom_methods.rb +43 -0
- data/test/holidays/definition/repository/test_holidays_by_month.rb +275 -0
- data/test/holidays/definition/repository/test_proc_result_cache.rb +91 -0
- data/test/holidays/definition/repository/test_regions.rb +104 -0
- data/test/holidays/definition/validator/test_custom_method.rb +94 -0
- data/test/holidays/definition/validator/test_region.rb +54 -0
- data/test/holidays/definition/validator/test_test.rb +60 -0
- data/test/holidays/finder/context/test_between.rb +172 -0
- data/test/holidays/finder/context/test_dates_driver_builder.rb +91 -0
- 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/integration/test_all_regions.rb +49 -0
- data/test/integration/test_any_holidays_during_work_week.rb +90 -0
- data/test/integration/test_available_regions.rb +23 -0
- data/test/integration/test_custom_holidays.rb +41 -0
- data/test/integration/test_custom_informal_holidays.rb +15 -0
- data/test/integration/test_custom_year_range_holidays.rb +35 -0
- data/test/integration/test_holidays.rb +243 -0
- data/test/integration/test_holidays_between.rb +87 -0
- 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 +37 -0
- metadata +649 -0
data/definitions/ve.yaml
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Venezuela holiday definitions for the Ruby Holiday gem.
|
|
2
|
+
#
|
|
3
|
+
# Just including nonworking days nationally
|
|
4
|
+
#
|
|
5
|
+
# Updated: 2012-09-14.
|
|
6
|
+
# Source: http://venciclopedia.com/index.php?title=D%C3%ADas_feriados_de_Venezuela
|
|
7
|
+
---
|
|
8
|
+
months:
|
|
9
|
+
0:
|
|
10
|
+
- name: Lunes Carnaval
|
|
11
|
+
regions: [ve]
|
|
12
|
+
function: easter(year)
|
|
13
|
+
function_modifier: -48
|
|
14
|
+
- name: Martes Carnaval
|
|
15
|
+
regions: [ve]
|
|
16
|
+
function: easter(year)
|
|
17
|
+
function_modifier: -47
|
|
18
|
+
- name: Jueves Santo
|
|
19
|
+
regions: [ve]
|
|
20
|
+
function: easter(year)
|
|
21
|
+
function_modifier: -3
|
|
22
|
+
- name: Viernes Santo
|
|
23
|
+
regions: [ve]
|
|
24
|
+
function: easter(year)
|
|
25
|
+
function_modifier: -2
|
|
26
|
+
1:
|
|
27
|
+
- name: Año Nuevo
|
|
28
|
+
regions: [ve]
|
|
29
|
+
mday: 1
|
|
30
|
+
4:
|
|
31
|
+
- name: Declaración Independencia
|
|
32
|
+
regions: [ve]
|
|
33
|
+
mday: 19
|
|
34
|
+
5:
|
|
35
|
+
- name: Día del Trabajador
|
|
36
|
+
regions: [ve]
|
|
37
|
+
mday: 1
|
|
38
|
+
6:
|
|
39
|
+
- name: Aniversario Batalla de Carabobo
|
|
40
|
+
regions: [ve]
|
|
41
|
+
mday: 24
|
|
42
|
+
7:
|
|
43
|
+
- name: Día de la Independencia
|
|
44
|
+
regions: [ve]
|
|
45
|
+
mday: 5
|
|
46
|
+
- name: Natalicio de Simón Bolívar
|
|
47
|
+
regions: [ve]
|
|
48
|
+
mday: 24
|
|
49
|
+
10:
|
|
50
|
+
- name: Día de la Resistencia Indígena
|
|
51
|
+
regions: [ve]
|
|
52
|
+
mday: 12
|
|
53
|
+
12:
|
|
54
|
+
- name: Día de Navidad
|
|
55
|
+
regions: [ve]
|
|
56
|
+
mday: 25
|
|
57
|
+
|
|
58
|
+
tests:
|
|
59
|
+
- given:
|
|
60
|
+
date: '2013-01-01'
|
|
61
|
+
regions: ["ve"]
|
|
62
|
+
expect:
|
|
63
|
+
name: "Año Nuevo"
|
|
64
|
+
- given:
|
|
65
|
+
date: '2013-02-11'
|
|
66
|
+
regions: ["ve"]
|
|
67
|
+
expect:
|
|
68
|
+
name: "Lunes Carnaval"
|
|
69
|
+
- given:
|
|
70
|
+
date: '2013-02-12'
|
|
71
|
+
regions: ["ve"]
|
|
72
|
+
expect:
|
|
73
|
+
name: "Martes Carnaval"
|
|
74
|
+
- given:
|
|
75
|
+
date: '2013-03-28'
|
|
76
|
+
regions: ["ve"]
|
|
77
|
+
expect:
|
|
78
|
+
name: "Jueves Santo"
|
|
79
|
+
- given:
|
|
80
|
+
date: '2013-03-29'
|
|
81
|
+
regions: ["ve"]
|
|
82
|
+
expect:
|
|
83
|
+
name: "Viernes Santo"
|
|
84
|
+
- given:
|
|
85
|
+
date: '2013-04-19'
|
|
86
|
+
regions: ["ve"]
|
|
87
|
+
expect:
|
|
88
|
+
name: "Declaración Independencia"
|
|
89
|
+
- given:
|
|
90
|
+
date: '2013-05-01'
|
|
91
|
+
regions: ["ve"]
|
|
92
|
+
expect:
|
|
93
|
+
name: "Día del Trabajador"
|
|
94
|
+
- given:
|
|
95
|
+
date: '2013-06-24'
|
|
96
|
+
regions: ["ve"]
|
|
97
|
+
expect:
|
|
98
|
+
name: "Aniversario Batalla de Carabobo"
|
|
99
|
+
- given:
|
|
100
|
+
date: '2013-07-05'
|
|
101
|
+
regions: ["ve"]
|
|
102
|
+
expect:
|
|
103
|
+
name: "Día de la Independencia"
|
|
104
|
+
- given:
|
|
105
|
+
date: '2013-07-24'
|
|
106
|
+
regions: ["ve"]
|
|
107
|
+
expect:
|
|
108
|
+
name: "Natalicio de Simón Bolívar"
|
|
109
|
+
- given:
|
|
110
|
+
date: '2013-10-12'
|
|
111
|
+
regions: ["ve"]
|
|
112
|
+
expect:
|
|
113
|
+
name: "Día de la Resistencia Indígena"
|
|
114
|
+
- given:
|
|
115
|
+
date: '2013-12-25'
|
|
116
|
+
regions: ["ve"]
|
|
117
|
+
expect:
|
|
118
|
+
name: "Día de Navidad"
|
data/definitions/vi.yaml
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Vietnam holiday definitions for the Ruby Holiday gem.
|
|
2
|
+
#
|
|
3
|
+
# Updated: 2014-07-17.
|
|
4
|
+
# Source: http://en.wikipedia.org/wiki/Public_holidays_in_Vietnam
|
|
5
|
+
---
|
|
6
|
+
months:
|
|
7
|
+
1:
|
|
8
|
+
- name: Tết dương lịch
|
|
9
|
+
regions: [vi]
|
|
10
|
+
mday: 1
|
|
11
|
+
3:
|
|
12
|
+
- name: Giỗ tổ Hùng Vương
|
|
13
|
+
regions: [vi]
|
|
14
|
+
function: lunar_to_solar(year, month, day, region)
|
|
15
|
+
mday: 10
|
|
16
|
+
4:
|
|
17
|
+
- name: Ngày Giải phóng miền Nam, thống nhất đất nước
|
|
18
|
+
regions: [vi]
|
|
19
|
+
mday: 30
|
|
20
|
+
5:
|
|
21
|
+
- name: Ngày Quốc tế Lao động
|
|
22
|
+
regions: [vi]
|
|
23
|
+
mday: 1
|
|
24
|
+
9:
|
|
25
|
+
- name: Quốc khánh
|
|
26
|
+
regions: [vi]
|
|
27
|
+
mday: 2
|
|
28
|
+
|
|
29
|
+
tests:
|
|
30
|
+
- given:
|
|
31
|
+
date: '2014-01-01'
|
|
32
|
+
regions: ["vi"]
|
|
33
|
+
expect:
|
|
34
|
+
name: "Tết dương lịch"
|
|
35
|
+
- given:
|
|
36
|
+
date: '2014-04-30'
|
|
37
|
+
regions: ["vi"]
|
|
38
|
+
expect:
|
|
39
|
+
name: "Ngày Giải phóng miền Nam, thống nhất đất nước"
|
|
40
|
+
- given:
|
|
41
|
+
date: '2014-05-01'
|
|
42
|
+
regions: ["vi"]
|
|
43
|
+
expect:
|
|
44
|
+
name: "Ngày Quốc tế Lao động"
|
|
45
|
+
- given:
|
|
46
|
+
date: '2014-09-02'
|
|
47
|
+
regions: ["vi"]
|
|
48
|
+
expect:
|
|
49
|
+
name: "Quốc khánh"
|
|
50
|
+
- given:
|
|
51
|
+
date: ['2017-04-06', '2018-03-27']
|
|
52
|
+
regions: ["vi"]
|
|
53
|
+
expect:
|
|
54
|
+
name: "Giỗ tổ Hùng Vương"
|
data/definitions/za.yaml
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# South African holiday definitions for the Ruby Holiday gem.
|
|
2
|
+
#
|
|
3
|
+
# Updated: 2008-11-29.
|
|
4
|
+
# Sources:
|
|
5
|
+
# - http://en.wikipedia.org/wiki/Public_holidays_in_South_Africa
|
|
6
|
+
# - http://www.info.gov.za/aboutsa/holidays.htm
|
|
7
|
+
---
|
|
8
|
+
months:
|
|
9
|
+
0:
|
|
10
|
+
- name: Good Friday
|
|
11
|
+
regions: [za]
|
|
12
|
+
function: easter(year)
|
|
13
|
+
function_modifier: -2
|
|
14
|
+
- name: Family Day
|
|
15
|
+
regions: [za]
|
|
16
|
+
function: easter(year)
|
|
17
|
+
function_modifier: 1
|
|
18
|
+
1:
|
|
19
|
+
- name: New Year's Day
|
|
20
|
+
regions: [za]
|
|
21
|
+
mday: 1
|
|
22
|
+
observed: to_monday_if_sunday(date)
|
|
23
|
+
3:
|
|
24
|
+
- name: Human Rights Day
|
|
25
|
+
regions: [za]
|
|
26
|
+
mday: 21
|
|
27
|
+
observed: to_monday_if_sunday(date)
|
|
28
|
+
4:
|
|
29
|
+
- name: Freedom Day
|
|
30
|
+
regions: [za]
|
|
31
|
+
mday: 27
|
|
32
|
+
observed: to_monday_if_sunday(date)
|
|
33
|
+
5:
|
|
34
|
+
- name: Workers Day
|
|
35
|
+
regions: [za]
|
|
36
|
+
mday: 1
|
|
37
|
+
observed: to_monday_if_sunday(date)
|
|
38
|
+
6:
|
|
39
|
+
- name: Youth Day
|
|
40
|
+
regions: [za]
|
|
41
|
+
mday: 16
|
|
42
|
+
observed: to_monday_if_sunday(date)
|
|
43
|
+
8:
|
|
44
|
+
- name: National Women's Day
|
|
45
|
+
regions: [za]
|
|
46
|
+
mday: 9
|
|
47
|
+
observed: to_monday_if_sunday(date)
|
|
48
|
+
9:
|
|
49
|
+
- name: Heritage Day
|
|
50
|
+
regions: [za]
|
|
51
|
+
mday: 24
|
|
52
|
+
observed: to_monday_if_sunday(date)
|
|
53
|
+
12:
|
|
54
|
+
- name: Day of Reconciliation
|
|
55
|
+
regions: [za]
|
|
56
|
+
mday: 16
|
|
57
|
+
observed: to_monday_if_sunday(date)
|
|
58
|
+
- name: Christmas Day
|
|
59
|
+
regions: [za]
|
|
60
|
+
mday: 25
|
|
61
|
+
observed: to_monday_if_sunday(date)
|
|
62
|
+
- name: Day of Goodwill
|
|
63
|
+
regions: [za]
|
|
64
|
+
mday: 26
|
|
65
|
+
observed: to_monday_if_sunday(date)
|
|
66
|
+
|
|
67
|
+
tests:
|
|
68
|
+
- given:
|
|
69
|
+
date: '2007-01-01'
|
|
70
|
+
regions: ["za"]
|
|
71
|
+
options: ["informal"]
|
|
72
|
+
expect:
|
|
73
|
+
name: "New Year's Day"
|
|
74
|
+
- given:
|
|
75
|
+
date: '2007-03-21'
|
|
76
|
+
regions: ["za"]
|
|
77
|
+
options: ["informal"]
|
|
78
|
+
expect:
|
|
79
|
+
name: "Human Rights Day"
|
|
80
|
+
- given:
|
|
81
|
+
date: '2007-04-06'
|
|
82
|
+
regions: ["za"]
|
|
83
|
+
options: ["informal"]
|
|
84
|
+
expect:
|
|
85
|
+
name: "Good Friday"
|
|
86
|
+
- given:
|
|
87
|
+
date: '2007-04-09'
|
|
88
|
+
regions: ["za"]
|
|
89
|
+
options: ["informal"]
|
|
90
|
+
expect:
|
|
91
|
+
name: "Family Day"
|
|
92
|
+
- given:
|
|
93
|
+
date: '2007-04-27'
|
|
94
|
+
regions: ["za"]
|
|
95
|
+
options: ["informal"]
|
|
96
|
+
expect:
|
|
97
|
+
name: "Freedom Day"
|
|
98
|
+
- given:
|
|
99
|
+
date: '2007-05-01'
|
|
100
|
+
regions: ["za"]
|
|
101
|
+
options: ["informal"]
|
|
102
|
+
expect:
|
|
103
|
+
name: "Workers Day"
|
|
104
|
+
- given:
|
|
105
|
+
date: '2007-06-16'
|
|
106
|
+
regions: ["za"]
|
|
107
|
+
options: ["informal"]
|
|
108
|
+
expect:
|
|
109
|
+
name: "Youth Day"
|
|
110
|
+
- given:
|
|
111
|
+
date: '2007-08-09'
|
|
112
|
+
regions: ["za"]
|
|
113
|
+
options: ["informal"]
|
|
114
|
+
expect:
|
|
115
|
+
name: "National Women's Day"
|
|
116
|
+
- given:
|
|
117
|
+
date: '2007-09-24'
|
|
118
|
+
regions: ["za"]
|
|
119
|
+
options: ["informal"]
|
|
120
|
+
expect:
|
|
121
|
+
name: "Heritage Day"
|
|
122
|
+
- given:
|
|
123
|
+
date: '2007-12-16'
|
|
124
|
+
regions: ["za"]
|
|
125
|
+
options: ["informal"]
|
|
126
|
+
expect:
|
|
127
|
+
name: "Day of Reconciliation"
|
|
128
|
+
- given:
|
|
129
|
+
date: '2007-12-25'
|
|
130
|
+
regions: ["za"]
|
|
131
|
+
options: ["informal"]
|
|
132
|
+
expect:
|
|
133
|
+
name: "Christmas Day"
|
|
134
|
+
- given:
|
|
135
|
+
date: '2007-12-26'
|
|
136
|
+
regions: ["za"]
|
|
137
|
+
options: ["informal"]
|
|
138
|
+
expect:
|
|
139
|
+
name: "Day of Goodwill"
|
data/doc/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# How to contribute
|
|
2
|
+
|
|
3
|
+
There are multiple ways to help! We rely on users around the world to help keep our definitions accurate and up to date. In addition, pull requests to address bugs or implement new features are always welcome.
|
|
4
|
+
|
|
5
|
+
## Code of Conduct
|
|
6
|
+
|
|
7
|
+
Please read our [Code of Conduct](../CODE_OF_CONDUCT.md) before contributing. Everyone interacting with this project (or associated projects) is expected to abide by its terms.
|
|
8
|
+
|
|
9
|
+
## General note
|
|
10
|
+
|
|
11
|
+
The definitions for this project are housed in a submodule. When pulling this repo please make sure to run `git clone --recursive git@github.com/holidays/holidays`
|
|
12
|
+
or, if you forgot to do so, run `make update-defs` so that all of the submodule data is pulled correctly.
|
|
13
|
+
|
|
14
|
+
## For definition updates
|
|
15
|
+
|
|
16
|
+
Our definitions are written in YAML. They are housed in a [separate repository](https://github.com/holidays/definitions) so that they can be used by tools written in other languages. You can find a complete guide to our format in the [definitions SYNTAX guide](https://github.com/holidays/definitions/blob/master/doc/SYNTAX.md).
|
|
17
|
+
|
|
18
|
+
In this ruby project we take the YAML definitions and generate final ruby classes that are loaded at runtime for fast calculations.
|
|
19
|
+
|
|
20
|
+
Once you have a good idea on what you want to change, please see the [CONTRIBUTING guide](https://github.com/holidays/definitions/blob/master/doc/CONTRIBUTING.md) in the `definitions` repository.
|
|
21
|
+
|
|
22
|
+
The idea is that if the validation passes on the other repo then you shouldn't have to worry about generating and testing here. We'll see how that goes!
|
|
23
|
+
|
|
24
|
+
Once that PR is accepted the maintainers of this project will be responsible for generating the updated definitions here and releasing a new gem. Don't worry about versioning, we'll take care of it!
|
|
25
|
+
|
|
26
|
+
#### Testing out your definitions locally
|
|
27
|
+
|
|
28
|
+
As mentioned above we use a git submodule for the definitions. Sometimes you might want to manually test out how this ruby project will behave with your changes. To facilitate that we provide some commands for pointing the definitions submodule to your fork/branch.
|
|
29
|
+
|
|
30
|
+
To point at your fork/branch:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
make clean-defs
|
|
34
|
+
BRANCH=<branch-name> USER=<user> make point-to-defs-branch
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Example:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
make clean-defs
|
|
41
|
+
BRANCH=issue-24 USER=ppeble make point-to-defs-branch
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This will pull everything down for the latest commit on that fork/branch. When you are done testing and want to point back at the master definitions:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
make clean-defs
|
|
48
|
+
make point-to-defs-master
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## For non-definition functionality
|
|
52
|
+
|
|
53
|
+
* Fork this repository
|
|
54
|
+
* Make your changes. Don't forget to run `make test` to execute the test suite!
|
|
55
|
+
* Create a PR pointing back to `master`
|
|
56
|
+
|
|
57
|
+
Don't worry about versioning, we'll handle it on our end.
|
|
58
|
+
|
|
59
|
+
*Tests are required*. If your PR results in lower test coverage then it will not be accepted.
|
|
60
|
+
|
|
61
|
+
## Local development helpers
|
|
62
|
+
|
|
63
|
+
We have included a few handy tasks to help you troubleshoot and test:
|
|
64
|
+
|
|
65
|
+
* `make test` - runs the entire suite
|
|
66
|
+
* `bundle exec ruby <test-file-to-run>` - runs just the tests in the specified file
|
|
67
|
+
* `REGION=<region> make test-region` - runs the tests for just that region
|
|
68
|
+
* `make console` - launches an IRB session with the 'holidays' gem loaded for quick testing
|
|
69
|
+
* `make update-defs` - runs the appropriate git submodule commands to pull the latest definitions
|
|
70
|
+
* `make clean-defs` - removes the definitions submodule, useful for switching between a fork and the main definitions repository
|
|
71
|
+
* `BRANCH=<branch> USER=<user> make point-to-defs-branch` - updates your definitions submodule to point at a fork/branch
|
|
72
|
+
* `make point-to-defs-master` - updates your definitions submodule to point back at the `holidays/definitions` repo and master branch
|
data/doc/MAINTAINERS.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Maintainers guide
|
|
2
|
+
|
|
3
|
+
This document outlines the process of releasing an update to the `holidays` gem. This update could
|
|
4
|
+
include any (or a combination of) the following:
|
|
5
|
+
|
|
6
|
+
* definition updates from the [definitions](https://github.com/holidays/definitions) repository
|
|
7
|
+
* bug fixes
|
|
8
|
+
* additional functionality
|
|
9
|
+
|
|
10
|
+
### semver
|
|
11
|
+
|
|
12
|
+
This gem operates under the rules of [semver](http://semver.org/). The decisions on what constitutes a major,
|
|
13
|
+
minor, or patch version update fall on the maintainer. If in doubt, follow these rules:
|
|
14
|
+
|
|
15
|
+
* Will this change mean that users will be REQUIRED to make a code change? If so then it is a major version bump. This includes dropping supported versions of ruby!
|
|
16
|
+
* Will this change mean that users might see a definition/behavior change but won't need to modify their own code? If so then it is as minor version bump
|
|
17
|
+
* Will this change mean that a bug, either in code or definitions, will be fixed? If so then it is a patch version bump
|
|
18
|
+
|
|
19
|
+
*@ppeble editor note*: I am pretty aggressive when it comes to version bumps! If the slightest functionality has changed then
|
|
20
|
+
I consider it a minor version bump, if ANY consumer code has to change then I consider it a major version bump. I don't care
|
|
21
|
+
if we get up to version 250, the version number doesn't matter. Communicating the effort required in updating is what matters!
|
|
22
|
+
|
|
23
|
+
### Who this document is for
|
|
24
|
+
|
|
25
|
+
This document is for maintainers that have merge access to this repository. These maintainers may or may not have access to the upstream
|
|
26
|
+
[definitions](https://github.com/holidays/definitions) repository.
|
|
27
|
+
|
|
28
|
+
Please note that a core contributor must provide the relevant Github access so that you can perform merges. If you have any issues
|
|
29
|
+
please contact the [core members](https://github.com/orgs/holidays/teams/core/members) for assistance.
|
|
30
|
+
|
|
31
|
+
### Setup
|
|
32
|
+
|
|
33
|
+
This guide assumes that you have forked the repository in Github. If you require assistance in this please contact the core members listed above.
|
|
34
|
+
|
|
35
|
+
You will need upload access to rubygems.org in order to publish gems. Contact a [core member](https://github.com/orgs/holidays/teams/core/members) for assistance.
|
|
36
|
+
|
|
37
|
+
### Release Overview
|
|
38
|
+
|
|
39
|
+
A release could contain one or more of the following:
|
|
40
|
+
|
|
41
|
+
* definition updates - these are rule updates pulled from https://github.com/holidays/definitions. These changes are not
|
|
42
|
+
language specific and will most likely require local regeneration of compiled rules.
|
|
43
|
+
* functionality additions - this is new functionality in this repository that uses the existing definitions
|
|
44
|
+
* bug fixes - these are bug fixes in this repository
|
|
45
|
+
|
|
46
|
+
It is up to the maintainer to determine what needs to be updated. We will attempt to outline the various scenarios in the
|
|
47
|
+
sections below.
|
|
48
|
+
|
|
49
|
+
### Release flow
|
|
50
|
+
|
|
51
|
+
* Does this update require definition updates? If YES, then:
|
|
52
|
+
* Pull the latest `master` version of this ruby repository and run `make update-defs`. This will grab the latest version from the [definitions](https://github.com/holidays/definitions) repository. Run `git diff` to verify that the version of the submodule for the definitions matches the latest commit in the [definitions](https://github.com/holidays/definitions) repo.
|
|
53
|
+
* Run the `make generate` command. This will 'recompile' the ruby sources with the latest definitions.
|
|
54
|
+
* Run `make test` and ensure that all of the tests pass. If any tests fail then do *not* merge and contact a [core member](https://github.com/orgs/holidays/teams/core/members) for assistance.
|
|
55
|
+
* If all of the tests pass, update the `lib/holidays/version.rb` file to the new version. Reference the above [semver](http://semver.org/) rules for how to update versions.
|
|
56
|
+
* Make a branch on your fork and update the [CHANGELOG](../CHANGELOG.md) to reflect the latest changes. You do not need to put in all of the definition changes in this update, you can simply reference the other repository. See other entries in the CHANGELOG for examples.
|
|
57
|
+
* Open a PR against the new branch and merge it (another maintainer will need to review before you can merge)
|
|
58
|
+
* Once the branch is merged, pull down the latest master from Github and run `make build`. This will generate a new `gem` file with the new version. The new version number is pulled from the above `version.rb` update.
|
|
59
|
+
* If the build was successful then you can run the following to push up to rubygems.org: `GEM=<gem> make push`. Example: `GEM=holidays-6.2.0.gem make push`
|
|
60
|
+
* Does this update require functionality additions or bug fixes? If YES, then:
|
|
61
|
+
* Run `make test` and ensure that all of the tests pass. If any tests fail then do *not* merge and contact a [core member](https://github.com/orgs/holidays/teams/core/members) for assistance.
|
|
62
|
+
* If all of the tests pass, make a branch on your fork and update the [CHANGELOG](../CHANGELOG.md) to reflect the latest changes.
|
|
63
|
+
* Update the `lib/holidays/version.rb` file to the new version. Reference the above [semver](http://semver.org/) rules for how to update versions.
|
|
64
|
+
* Open a PR against the new branch and merge it (another maintainer will need to review before you can merge)
|
|
65
|
+
* Once the branch is merged, pull down the latest master from Github and run `make build`. This will generate a new `gem` file with the new version. The new version number is pulled from the above `version.rb` update.
|
|
66
|
+
* If the build was successful then you can run the following to push up to rubygems.org: `GEM=<gem> make push`. Example: `GEM=holidays-6.2.0.gem make push`
|
|
67
|
+
|
|
68
|
+
You are done! The latest version should be uploaded to rubygems.org. You can go to view the [holidays page](https://rubygems.org/gems/holidays) to verify that the latest version is available.
|
|
69
|
+
|
|
70
|
+
It is totally acceptable to do both functionality AND definition updates in a single release. Simply combine both sets of rules into a single branch for your update.
|
|
71
|
+
|
|
72
|
+
### Troubleshooting
|
|
73
|
+
|
|
74
|
+
The biggest hurdle in this repository is that [upstream definition](https://github.com/holidays/definitions) changes will
|
|
75
|
+
result in failures in existing tests and it will not be because of ruby issues but rather upstream issues. If you notice any test failures
|
|
76
|
+
that seem to be specific to certain regions then look at recent changes in that other repository. If there were changes there then the odds
|
|
77
|
+
are that there are issues in the definition-specific tests. This is most likely not a language (i.e. ruby) specific issue.
|
|
78
|
+
|
|
79
|
+
It is a known issue that the definitions do not have a good set of self-tests to ensure that they are internally consistent. This means that a failure in this
|
|
80
|
+
repository could NOT be related to ruby specifically. It could be that the 'tests' specified in in the YAML files are incorrect! If you encounter errors here
|
|
81
|
+
make sure that you don't assume that it is just a ruby error that is causing the issues!
|
data/doc/REFERENCES
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
=== References
|
|
2
|
+
|
|
3
|
+
We are eternally grateful to the following sources.
|
|
4
|
+
|
|
5
|
+
==== Date calculations
|
|
6
|
+
* http://michaelthompson.org/technikos/holidays.php
|
|
7
|
+
|
|
8
|
+
==== Easter calculations
|
|
9
|
+
* http://www.assa.org.au/edm.html
|
|
10
|
+
* http://www.smart.net/~mmontes/ec-cal.html
|
|
11
|
+
* https://github.com/Loyolny/when_easter - graciously allowed by Michał Nierebiński
|
|
12
|
+
|
|
13
|
+
==== World dates
|
|
14
|
+
* http://www.un.org/geninfo/faq/factsheets/FS18.HTM
|
|
15
|
+
* http://en.wikipedia.org/wiki/List_of_holidays_by_country
|
|
16
|
+
|
|
17
|
+
Other sources for specific regions are noted in the definitions files themselves.
|
|
18
|
+
|
|
19
|
+
If a commit sneaks past the maintainers without attribution then please, let us know immediately! It was entirely unintentional.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
==== Regional definitions
|
|
2
|
+
The following definition files are included in this installation:
|
|
3
|
+
|
|
4
|
+
* generated_definitions/REGIONS
|
|
5
|
+
* generated_definitions/ar
|
|
6
|
+
* generated_definitions/at
|
|
7
|
+
* generated_definitions/au
|
|
8
|
+
* generated_definitions/be
|
|
9
|
+
* generated_definitions/be_fr
|
|
10
|
+
* generated_definitions/be_nl
|
|
11
|
+
* generated_definitions/bg
|
|
12
|
+
* generated_definitions/br
|
|
13
|
+
* generated_definitions/ca
|
|
14
|
+
* generated_definitions/ch
|
|
15
|
+
* generated_definitions/cl
|
|
16
|
+
* generated_definitions/co
|
|
17
|
+
* generated_definitions/cr
|
|
18
|
+
* generated_definitions/cz
|
|
19
|
+
* generated_definitions/de
|
|
20
|
+
* generated_definitions/dk
|
|
21
|
+
* generated_definitions/ecbtarget
|
|
22
|
+
* generated_definitions/ee
|
|
23
|
+
* generated_definitions/el
|
|
24
|
+
* generated_definitions/es
|
|
25
|
+
* generated_definitions/europe
|
|
26
|
+
* generated_definitions/federalreserve
|
|
27
|
+
* generated_definitions/federalreservebanks
|
|
28
|
+
* generated_definitions/fedex
|
|
29
|
+
* generated_definitions/fi
|
|
30
|
+
* generated_definitions/fr
|
|
31
|
+
* generated_definitions/gb
|
|
32
|
+
* generated_definitions/ge
|
|
33
|
+
* generated_definitions/gr
|
|
34
|
+
* generated_definitions/hk
|
|
35
|
+
* generated_definitions/hr
|
|
36
|
+
* generated_definitions/hu
|
|
37
|
+
* generated_definitions/ie
|
|
38
|
+
* generated_definitions/is
|
|
39
|
+
* generated_definitions/it
|
|
40
|
+
* generated_definitions/jp
|
|
41
|
+
* generated_definitions/ke
|
|
42
|
+
* generated_definitions/kr
|
|
43
|
+
* generated_definitions/kz
|
|
44
|
+
* generated_definitions/li
|
|
45
|
+
* generated_definitions/lt
|
|
46
|
+
* generated_definitions/lu
|
|
47
|
+
* generated_definitions/lv
|
|
48
|
+
* generated_definitions/ma
|
|
49
|
+
* generated_definitions/mt_en
|
|
50
|
+
* generated_definitions/mt_mt
|
|
51
|
+
* generated_definitions/mx
|
|
52
|
+
* generated_definitions/my
|
|
53
|
+
* generated_definitions/nerc
|
|
54
|
+
* generated_definitions/ng
|
|
55
|
+
* generated_definitions/nl
|
|
56
|
+
* generated_definitions/no
|
|
57
|
+
* generated_definitions/northamerica
|
|
58
|
+
* generated_definitions/nyse
|
|
59
|
+
* generated_definitions/nz
|
|
60
|
+
* generated_definitions/pe
|
|
61
|
+
* generated_definitions/ph
|
|
62
|
+
* generated_definitions/pl
|
|
63
|
+
* generated_definitions/pt
|
|
64
|
+
* generated_definitions/ro
|
|
65
|
+
* generated_definitions/rs_cyrl
|
|
66
|
+
* generated_definitions/rs_la
|
|
67
|
+
* generated_definitions/ru
|
|
68
|
+
* generated_definitions/scandinavia
|
|
69
|
+
* generated_definitions/se
|
|
70
|
+
* generated_definitions/sg
|
|
71
|
+
* generated_definitions/si
|
|
72
|
+
* generated_definitions/sk
|
|
73
|
+
* generated_definitions/southamerica
|
|
74
|
+
* generated_definitions/th
|
|
75
|
+
* generated_definitions/tn
|
|
76
|
+
* generated_definitions/tr
|
|
77
|
+
* generated_definitions/ua
|
|
78
|
+
* generated_definitions/unitednations
|
|
79
|
+
* generated_definitions/ups
|
|
80
|
+
* generated_definitions/us
|
|
81
|
+
* generated_definitions/ve
|
|
82
|
+
* generated_definitions/vi
|
|
83
|
+
* generated_definitions/za
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Holidays
|
|
3
|
+
REGIONS = [:ar, :at, :au, :au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_wa, :au_tas, :au_tas_south, :au_qld_cairns, :au_qld_brisbane, :au_tas_north, :au_vic_melbourne, :be_fr, :be_nl, :br, :bg_en, :bg_bg, :ca, :ca_qc, :ca_ab, :ca_sk, :ca_on, :ca_bc, :ca_nb, :ca_mb, :ca_ns, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_yt, :us, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_ne, :ch_ge, :ch_ju, :ch_vs, :ch, :cl, :co, :cr, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_be, :de_mv, :de_by_cath, :de_by_augsburg, :de_th, :de_bb, :de_hb, :de_hh, :de_ni, :de_sh, :ecbtarget, :ee, :es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex, :es, :es_ct, :es_v, :es_vc, :federalreserve, :federalreservebanks, :fedex, :fi, :fr_a, :fr_m, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :gb_con, :im, :gb_iom, :ge, :gr, :hr, :hk, :hu, :ie, :is, :it, :it_ve, :it_tv, :it_vr, :it_pd, :it_fi, :it_ge, :it_to, :it_rm, :it_vi, :it_bl, :it_ro, :ke, :kr, :kz, :li, :lt, :lv, :ma, :mt_mt, :mt_en, :mx, :mx_pue, :nerc, :nl, :lu, :no, :nyse, :nz, :nz_sl, :nz_we, :nz_ak, :nz_nl, :nz_ne, :nz_ot, :nz_ta, :nz_sc, :nz_hb, :nz_mb, :nz_ca, :nz_ch, :nz_wl, :pe, :ph, :pl, :pt, :pt_li, :pt_po, :ro, :rs_cyrl, :rs_la, :ru, :se, :tn, :tr, :ua, :us_fl, :us_la, :us_ct, :us_de, :us_gu, :us_hi, :us_in, :us_ky, :us_nj, :us_nc, :us_nd, :us_pr, :us_tn, :us_ms, :us_id, :us_ar, :us_tx, :us_dc, :us_md, :us_va, :us_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, :unitednations, :ups, :za, :ve, :sk, :si, :jp, :vi, :sg, :my, :th, :ng]
|
|
4
|
+
|
|
5
|
+
PARENT_REGION_LOOKUP = {:ar=>:ar, :at=>:at, :au=>:au, :au_nsw=>:au, :au_vic=>:au, :au_qld=>:au, :au_nt=>:au, :au_act=>:au, :au_sa=>:au, :au_wa=>:au, :au_tas=>:au, :au_tas_south=>:au, :au_qld_cairns=>:au, :au_qld_brisbane=>:au, :au_tas_north=>:au, :au_vic_melbourne=>:au, :be_fr=>:be_fr, :be_nl=>:be_nl, :br=>:br, :bg_en=>:bg, :bg_bg=>:bg, :ca=>:ca, :ca_qc=>:ca, :ca_ab=>:ca, :ca_sk=>:ca, :ca_on=>:ca, :ca_bc=>:ca, :ca_nb=>:ca, :ca_mb=>:ca, :ca_ns=>:ca, :ca_pe=>:ca, :ca_nl=>:ca, :ca_nt=>:ca, :ca_nu=>:ca, :ca_yt=>:ca, :us=>:us, :ch_zh=>:ch, :ch_be=>:ch, :ch_lu=>:ch, :ch_ur=>:ch, :ch_sz=>:ch, :ch_ow=>:ch, :ch_nw=>:ch, :ch_gl=>:ch, :ch_zg=>:ch, :ch_fr=>:ch, :ch_so=>:ch, :ch_bs=>:ch, :ch_bl=>:ch, :ch_sh=>:ch, :ch_ar=>:ch, :ch_ai=>:ch, :ch_sg=>:ch, :ch_gr=>:ch, :ch_ag=>:ch, :ch_tg=>:ch, :ch_ti=>:ch, :ch_vd=>:ch, :ch_ne=>:ch, :ch_ge=>:ch, :ch_ju=>:ch, :ch_vs=>:ch, :ch=>:ch, :cl=>:cl, :co=>:co, :cr=>:cr, :cz=>:cz, :dk=>:dk, :de=>:de, :de_bw=>:de, :de_by=>:de, :de_he=>:de, :de_nw=>:de, :de_rp=>:de, :de_sl=>:de, :de_sn_sorbian=>:de, :de_th_cath=>:de, :de_sn=>:de, :de_st=>:de, :de_be=>:de, :de_mv=>:de, :de_by_cath=>:de, :de_by_augsburg=>:de, :de_th=>:de, :de_bb=>:de, :de_hb=>:de, :de_hh=>:de, :de_ni=>:de, :de_sh=>:de, :ecbtarget=>:ecbtarget, :ee=>:ee, :es_pv=>:es, :es_na=>:es, :es_an=>:es, :es_ib=>:es, :es_cm=>:es, :es_mu=>:es, :es_m=>:es, :es_ar=>:es, :es_cl=>:es, :es_cn=>:es, :es_lo=>:es, :es_ga=>:es, :es_ce=>:es, :es_o=>:es, :es_ex=>:es, :es=>:es, :es_ct=>:es, :es_v=>:es, :es_vc=>:es, :federalreserve=>:federalreserve, :federalreservebanks=>:federalreservebanks, :fedex=>:fedex, :fi=>:fi, :fr_a=>:fr, :fr_m=>:fr, :fr=>:fr, :gb=>:gb, :gb_eng=>:gb, :gb_wls=>:gb, :gb_eaw=>:gb, :gb_nir=>:gb, :je=>:gb, :gb_jsy=>:gb, :gg=>:gb, :gb_gsy=>:gb, :gb_sct=>:gb, :gb_con=>:gb, :im=>:gb, :gb_iom=>:gb, :ge=>:ge, :gr=>:gr, :hr=>:hr, :hk=>:hk, :hu=>:hu, :ie=>:ie, :is=>:is, :it=>:it, :it_ve=>:it, :it_tv=>:it, :it_vr=>:it, :it_pd=>:it, :it_fi=>:it, :it_ge=>:it, :it_to=>:it, :it_rm=>:it, :it_vi=>:it, :it_bl=>:it, :it_ro=>:it, :ke=>:ke, :kr=>:kr, :kz=>:kz, :li=>:li, :lt=>:lt, :lv=>:lv, :ma=>:ma, :mt_mt=>:mt_mt, :mt_en=>:mt_en, :mx=>:mx, :mx_pue=>:mx, :nerc=>:nerc, :nl=>:nl, :lu=>:lu, :no=>:no, :nyse=>:nyse, :nz=>:nz, :nz_sl=>:nz, :nz_we=>:nz, :nz_ak=>:nz, :nz_nl=>:nz, :nz_ne=>:nz, :nz_ot=>:nz, :nz_ta=>:nz, :nz_sc=>:nz, :nz_hb=>:nz, :nz_mb=>:nz, :nz_ca=>:nz, :nz_ch=>:nz, :nz_wl=>:nz, :pe=>:pe, :ph=>:ph, :pl=>:pl, :pt=>:pt, :pt_li=>:pt, :pt_po=>:pt, :ro=>:ro, :rs_cyrl=>:rs_cyrl, :rs_la=>:rs_la, :ru=>:ru, :se=>:se, :tn=>:tn, :tr=>:tr, :ua=>:ua, :us_fl=>:us, :us_la=>:us, :us_ct=>:us, :us_de=>:us, :us_gu=>:us, :us_hi=>:us, :us_in=>:us, :us_ky=>:us, :us_nj=>:us, :us_nc=>:us, :us_nd=>:us, :us_pr=>:us, :us_tn=>:us, :us_ms=>:us, :us_id=>:us, :us_ar=>:us, :us_tx=>:us, :us_dc=>:us, :us_md=>:us, :us_va=>:us, :us_vt=>:us, :us_ak=>:us, :us_ca=>:us, :us_me=>:us, :us_ma=>:us, :us_al=>:us, :us_ga=>:us, :us_ne=>:us, :us_mo=>:us, :us_sc=>:us, :us_wv=>:us, :us_vi=>:us, :us_ut=>:us, :us_ri=>:us, :us_az=>:us, :us_co=>:us, :us_il=>:us, :us_mt=>:us, :us_nm=>:us, :us_ny=>:us, :us_oh=>:us, :us_pa=>:us, :us_mi=>:us, :us_mn=>:us, :us_nv=>:us, :us_or=>:us, :us_sd=>:us, :us_wa=>:us, :us_wi=>:us, :us_wy=>:us, :us_ia=>:us, :us_ks=>:us, :us_nh=>:us, :us_ok=>:us, :unitednations=>:unitednations, :ups=>:ups, :za=>:za, :ve=>:southamerica, :sk=>:europe, :si=>:europe, :jp=>:jp, :vi=>:vi, :sg=>:sg, :my=>:my, :th=>:th, :ng=>:ng}
|
|
6
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Holidays
|
|
3
|
+
# This file is generated by the Ruby Holidays gem.
|
|
4
|
+
#
|
|
5
|
+
# Definitions loaded: definitions/ar.yaml
|
|
6
|
+
#
|
|
7
|
+
# All the definitions are available at https://github.com/holidays/holidays
|
|
8
|
+
module AR # :nodoc:
|
|
9
|
+
def self.defined_regions
|
|
10
|
+
[:ar]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def self.holidays_by_month
|
|
14
|
+
{
|
|
15
|
+
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:ar]},
|
|
16
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :name => "Carnaval Lunes", :regions => [:ar]},
|
|
17
|
+
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Carnaval Martes", :regions => [:ar]}],
|
|
18
|
+
1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:ar]}],
|
|
19
|
+
3 => [{:mday => 24, :name => "Día Nacional de la Memoria por la Verdad y la Justicia", :regions => [:ar]}],
|
|
20
|
+
4 => [{:mday => 2, :name => "Día del Veterano y de los Caídos en la Guerra de Malvinas", :regions => [:ar]}],
|
|
21
|
+
5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:ar]},
|
|
22
|
+
{:mday => 25, :name => "Día de la Revolución de Mayo", :regions => [:ar]},
|
|
23
|
+
{:mday => 24, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
|
|
24
|
+
6 => [{:mday => 17, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Paso a la Inmortalidad del General Martín Miguel de Güemes", :regions => [:ar]},
|
|
25
|
+
{:mday => 20, :name => "Día de la Bandera", :regions => [:ar]}],
|
|
26
|
+
7 => [{:mday => 8, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
|
|
27
|
+
{:mday => 9, :name => "Día de la Independencia", :regions => [:ar]}],
|
|
28
|
+
8 => [{:mday => 17, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]}],
|
|
29
|
+
10 => [{:mday => 12, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
|
|
30
|
+
{:mday => 8, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
|
|
31
|
+
11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]},
|
|
32
|
+
{:mday => 22, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
|
|
33
|
+
12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:ar]},
|
|
34
|
+
{:mday => 9, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
|
|
35
|
+
{:mday => 25, :name => "Navidad", :regions => [:ar]}]
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.custom_methods
|
|
40
|
+
{
|
|
41
|
+
"to_nearest_monday(date)" => Proc.new { |date|
|
|
42
|
+
case date.wday
|
|
43
|
+
when 5
|
|
44
|
+
date += 3
|
|
45
|
+
when 4
|
|
46
|
+
date += 4
|
|
47
|
+
when 3
|
|
48
|
+
date -= 2
|
|
49
|
+
when 2
|
|
50
|
+
date -= 1
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
date
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|