Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add german public holidays #681

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Duckling/Time/DE/Corpus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1158,4 +1158,37 @@ allExamples = concat
, examples (datetimeIntervalHoliday ((2018, 2, 14, 0, 0, 0), (2018, 4, 1, 0, 0, 0)) Day "Fastenzeit")
[ "Fastenzeit 2018"
]
, examples (datetimeHoliday (2018, 1, 6, 0, 0, 0) Day "Heilige drei Könige")
[ "Heilige drei Könige 2018"
]
, examples (datetimeHoliday (2018, 3, 8, 0, 0, 0) Day "Internationaler Frauentag")
[ "Frauentag 2018"
]
, examples (datetimeHoliday (2018, 4, 1, 0, 0, 0) Day "Ostersonntag")
[ "Ostersonntag 2018"
]
, examples (datetimeHoliday (2018, 5, 1, 0, 0, 0) Day "Tag der Arbeit")
[ "Tag der Arbeit 2018"
]
, examples (datetimeHoliday (2018, 8, 8, 0, 0, 0) Day "Augsburger Friedensfest")
[ "Augsburger Friedensfest 2018"
]
, examples (datetimeHoliday (2018, 9, 20, 0, 0, 0) Day "Weltkindertag")
[ "Weltkindertag 2018"
]
, examples (datetimeHoliday (2018, 10, 31, 0, 0, 0) Day "Reformationstag")
[ "Reformationstag 2018"
]
, examples (datetimeHoliday (2018, 12, 25, 0, 0, 0) Day "Weihnachten")
[ "1. Weihnachtstag 2018"
]
, examples (datetimeHoliday (2018, 12, 26, 0, 0, 0) Day "2. Weihnachtsfeiertag")
[ "2. Weihnachtstag 2018"
]
, examples (datetimeHoliday (2018, 2, 12, 0, 0, 0) Day "Rosenmontag")
[ "Rosenmontag 2018"
]
, examples (datetimeHoliday (2018, 2, 8, 0, 0, 0) Day "Weiberfastnacht")
[ "Weiberfastnacht 2018"
]
]
22 changes: 21 additions & 1 deletion Duckling/Time/DE/Rules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,40 @@ ruleHolidays :: [Rule]
ruleHolidays = mkRuleHolidays
[ ( "Neujahr" , "neujahr(s?tag)?"
, monthDay 1 1 )
, ( "Heilige drei Könige" , "heilige drei könige"
, monthDay 1 6 )
, ( "Valentinstag" , "valentin'?stag"
, monthDay 2 14 )
, ( "Internationaler Frauentag" , "(internationaler )?frauentag"
, monthDay 3 8 )
, ( "Tag der Arbeit" , "tag der arbeit|maifeiertag"
, monthDay 5 1 )
, ( "Schweizer Bundesfeiertag"
, "schweiz(er)? (bundes)?feiertag|bundes feiertag"
, monthDay 8 1 )
, ( "Augsburger Friedensfest" , "augsburger( ?hohes)? friedensfest"
, monthDay 8 8 )
, ( "Weltkindertag" , "weltkindertag"
, monthDay 9 20 )
, ( "Tag der Deutschen Einheit" , "tag (der)? deutsc?hen? einheit"
, monthDay 10 3 )
, ( "Oesterreichischer Nationalfeiertag"
, "((ö)sterreichischer?)? nationalfeiertag|national feiertag"
, monthDay 10 26 )
, ( "Halloween" , "hall?owe?en?"
, monthDay 10 31 )
, ( "Reformationstag" , "reformationstag"
, monthDay 10 31 )
, ( "Allerheiligen" , "allerheiligen?|aller heiligen?"
, monthDay 11 1 )
, ( "Nikolaus" , "nikolaus(tag)?|nikolaus tag|nikolo"
, monthDay 12 6 )
, ( "Heiligabend" , "heilig(er)? abend"
, monthDay 12 24 )
, ( "Weihnachten" , "weih?nacht(en|stag)?"
, ( "Weihnachten" , "weih?nacht(en|stag)?|(1\\.|erster) weihnachts(feier)?tag"
, monthDay 12 25 )
, ( "2. Weihnachtsfeiertag" , "(2\\.|zweiter) weihnachts(feier)?tag"
, monthDay 12 26 )
, ( "Silvester" , "silvester"
, monthDay 12 31 )
, ( "Muttertag" , "mutt?ertag|mutt?er (tag)?"
Expand All @@ -120,6 +134,10 @@ ruleComputedHolidays = mkRuleHolidays
, cycleNthAfter False TG.Day 39 easterSunday )
, ( "Aschermittwoch", "ascher?(tag|mittwoch)"
, cycleNthAfter False TG.Day (-46) easterSunday )
, ( "Rosenmontag", "rosenmontag"
, cycleNthAfter False TG.Day (-48) easterSunday )
, ( "Weiberfastnacht", "weiberfastnacht"
, cycleNthAfter False TG.Day (-52) easterSunday )
, ( "Aschura", "asc?hura(\\-?tag)?"
, cycleNthAfter False TG.Day 9 muharram )
, ( "Bhai Dooj", "bhai(ya)?\\s+d(u|oo)j|bhau\\-beej|bhai\\s+(tika|phonta)"
Expand Down Expand Up @@ -239,6 +257,8 @@ ruleComputedHolidays = mkRuleHolidays
, "[yj]om hashoah|[yj]om hazikaron lashoah ve-lag'vurah|holocaust\\-?gedenktag"
, cycleNthAfter False TG.Day 12 passover )
, ( "Jom Kippur", "[yj]om\\s+kippur", cycleNthAfter False TG.Day 9 roshHashana )
, ( "Pfingstsonntag", "pfingstsonntag"
, cycleNthAfter False TG.Day 49 easterSunday )
, ( "Pfingstmontag", "pfingstmontag|(pentecost|whit)\\s+montag"
, cycleNthAfter False TG.Day 50 easterSunday )
, ( "Rabindra Jayanti", "rabindra(nath)?\\s+jayanti", rabindraJayanti )
Expand Down