Skip to content

Commit

Permalink
Added Reformationstag to list of publich holidays in Bremen, Hamburg,…
Browse files Browse the repository at this point in the history
… Niedersachsen and Schleswig-Holstein starting 2018.
  • Loading branch information
wlbr committed Nov 2, 2018
1 parent c00accc commit f885d7c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: go
sudo: false
go:
- master
- stable
before_install:
- go get github.com/mattn/goveralls
- go get github.com/mattn/goveralls
- "$HOME/gopath/bin/goveralls -service=travis-ci"
script:
- "$HOME/gopath/bin/goveralls -service=travis-ci"
- make buildcmd
deploy:
provider: releases
Expand Down
19 changes: 17 additions & 2 deletions region.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,18 @@ func Brandenburg(y int, inklSonntage ...bool) Region {
// Bremen returns a Region object holding all public holidays in the state Bremen
func Bremen(y int, inklSonntage ...bool) Region {
ffun := []func(int) Feiertag{}
if y >= 2018 {
ffun = append(ffun, Reformationstag)
}
return Region{"Bremen", "HB", createFeiertagsList(y, "DE", ffun)}
}

// Hamburg returns a Region object holding all public holidays in the state Hamburg
func Hamburg(y int, inklSonntage ...bool) Region {
ffun := []func(int) Feiertag{}
if y >= 2018 {
ffun = append(ffun, Reformationstag)
}
return Region{"Hamburg", "HH", createFeiertagsList(y, "DE", ffun)}
}

Expand All @@ -148,6 +154,9 @@ func MecklenburgVorpommern(y int, inklSonntage ...bool) Region {
// state Niedersachsen
func Niedersachsen(y int, inklSonntage ...bool) Region {
ffun := []func(int) Feiertag{}
if y >= 2018 {
ffun = append(ffun, Reformationstag)
}
return Region{"Niedersachsen", "NI", createFeiertagsList(y, "DE", ffun)}
}

Expand Down Expand Up @@ -186,6 +195,9 @@ func SachsenAnhalt(y int, inklSonntage ...bool) Region {
// SchleswigHolstein returns a Region object holding all public holidays in the state SchleswigHolstein
func SchleswigHolstein(y int, inklSonntage ...bool) Region {
ffun := []func(int) Feiertag{}
if y >= 2018 {
ffun = append(ffun, Reformationstag)
}
return Region{"Schleswig-Holstein", "SH", createFeiertagsList(y, "DE", ffun)}
}

Expand Down Expand Up @@ -264,7 +276,7 @@ func Österreich(y int, inklSonntage ...bool) Region {
}

// All returns a Region object holding all public holidays/feast days known to this program.
// Not all of htem are public holidays (basically 'work free' days).
// Not all of them are public holidays (basically 'work free' days).
func All(y int, inklSonntage ...bool) Region {

/* ffun := []func(int) Feiertag{Neujahr, Epiphanias, HeiligeDreiKönige, Valentinstag,
Expand All @@ -281,10 +293,13 @@ func All(y int, inklSonntage ...bool) Region {
feiern := []func(int) Feiertag{Epiphanias, Valentinstag,
Josefitag, Weiberfastnacht, Rosenmontag, Fastnacht, Aschermittwoch, Gründonnerstag,
BeginnSommerzeit, Walpurgisnacht, Florianitag, TagDerBefreiung, Muttertag, Vatertag,
Rupertitag, TagDerVolksabstimmung, Reformationstag, Halloween, BeginnWinterzeit,
Rupertitag, TagDerVolksabstimmung, Halloween, BeginnWinterzeit,
Allerseelen, Martinstag, Karnevalsbeginn, Leopolditag, BußUndBettag, Thanksgiving,
Blackfriday, Nikolaus, MariäUnbefleckteEmpfängnis, Heiligabend, Silvester}

if y != 2017 {
feiern = append(feiern, Reformationstag)
}
for _, f := range createCommonFeiertagsList(y) {
feiern = append(feiern, f)
}
Expand Down

0 comments on commit f885d7c

Please sign in to comment.