0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/discourse-calendar/vendor/holidays/lib/generated_definitions/de.rb
Gary Pendergast 1983a44812
CHORE: Import holiday definition updates. (#34835)
The Discourse Calendar plugin includes a hard fork of the [holidays
gem](https://github.com/holidays/holidays/).

There have been some updates to the original gem since the fork, this
change pulls in the major updates.

---------

Co-authored-by: Ivan Kuchin <tadump+git@gmail.com>
Co-authored-by: Phil Peble <ppeble@activecampaign.com>
Co-authored-by: Claudio Rodrigo Pereyra Diaz <claudiorodrigo@pereyradiaz.com.ar>
Co-authored-by: Michael Smith <michael.smith076@msd.govt.nz>
Co-authored-by: Lairton Mendes <lairton.mendes@gmail.com>
Co-authored-by: Lars Aurbakken <Lars.Aurbakken@ist.com>
Co-authored-by: i2chris <35810281+i2chris@users.noreply.github.com>
Co-authored-by: Dennis van de Hoef <dennisvdhoef@gmail.com>
2025-09-17 16:07:06 +10:00

63 lines
4.3 KiB
Ruby
Vendored

# encoding: utf-8
module Holidays
# This file is generated by the Ruby Holidays gem.
#
# Definitions loaded: definitions/de.yaml
#
# All the definitions are available at https://github.com/holidays/holidays
module DE # :nodoc:
def self.defined_regions
[: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_by_cath, :de_by_augsburg, :de_th, :de_bb, :de_mv, :de_hb, :de_hh, :de_ni, :de_sh]
end
def self.holidays_by_month
{
0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Karfreitag", :regions => [:de]},
{:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Ostersonntag", :regions => [:de]},
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Ostermontag", :regions => [:de]},
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Christi Himmelfahrt", :regions => [:de]},
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :type => :informal, :name => "Pfingstsonntag", :regions => [:de]},
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Pfingstmontag", :regions => [:de]},
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath]},
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -52, :type => :informal, :name => "Weiberfastnacht", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]},
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :type => :informal, :name => "Rosenmontag", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]},
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -46, :type => :informal, :name => "Aschermittwoch", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]}],
1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:de]},
{:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]}],
3 => [{:mday => 8, :year_ranges => { :from => 2019 },:name => "Internationaler Frauentag", :regions => [:de_be]}],
5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
{:mday => 8, :year_ranges => { :limited => [2020] },:name => "Tag der Befreiung", :regions => [:de_be]}],
8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by_cath, :de_by_augsburg, :de_sl]},
{:mday => 8, :name => "Friedensfest", :regions => [:de_by_augsburg]}],
9 => [{:mday => 20, :year_ranges => { :from => 2019 },:name => "Weltkindertag", :regions => [:de_th]}],
10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
{:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
{:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
{:mday => 31, :year_ranges => { :limited => [2017] },:name => "Reformationstag", :regions => [:de]},
{:mday => 31, :year_ranges => { :from => 2018 },:name => "Reformationstag", :regions => [:de_hb, :de_hh, :de_ni, :de_sh]}],
11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
{:function => "de_buss_und_bettag(year)", :function_arguments => [:year], :name => "Buß- und Bettag", :regions => [:de_sn]}],
12 => [{:mday => 24, :type => :informal, :name => "Heilig Abend", :regions => [:de]},
{:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
{:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]},
{:mday => 31, :type => :informal, :name => "Silvester", :regions => [:de]}]
}
end
def self.custom_methods
{
"de_buss_und_bettag(year)" => Proc.new { |year|
date = Date.civil(year,11,23)
if date.wday > 3
date -= (date.wday - 3)
else
date -= (date.wday + 4)
end
date
},
}
end
end
end