Documentation
¶
Index ¶
- func SetDefaultTimeFormat(timeformat string)
- func SetDefaultTimeZone(timezone *time.Location)
- type ByDate
- type Feiertag
- func Allerheiligen(year int) Feiertag
- func Allerseelen(year int) Feiertag
- func Antikriegstag(year int) Feiertag
- func Aschermittwoch(year int) Feiertag
- func BeginnSommerzeit(year int) Feiertag
- func BeginnWinterzeit(year int) Feiertag
- func Blackfriday(year int) Feiertag
- func BußUndBettag(year int) Feiertag
- func ChristiHimmelfahrt(year int) Feiertag
- func Christtag(year int) Feiertag
- func Dreifaltigkeitssonntag(year int) Feiertag
- func DritterAdvent(year int) Feiertag
- func Epiphanias(year int) Feiertag
- func Erntedankfest(year int) Feiertag
- func ErsterAdvent(year int) Feiertag
- func Fastnacht(year int) Feiertag
- func Florianitag(year int) Feiertag
- func Fronleichnam(year int) Feiertag
- func FêteDeLaMusique(year int) Feiertag
- func GetFeiertageForDate(t time.Time) []Feiertag
- func GetFeiertageForDateInRegion(t time.Time, regionFn func(y int, inklSonntage ...bool) Region, ...) []Feiertag
- func Gründonnerstag(year int) Feiertag
- func Halloween(year int) Feiertag
- func Handtuchtag(year int) Feiertag
- func Heiligabend(year int) Feiertag
- func HeiligeDreiKönige(year int) Feiertag
- func HobbitDay(year int) Feiertag
- func InternationalerFrauentag(year int) Feiertag
- func InternationalerKindertag(year int) Feiertag
- func InternationalerMännertag(year int) Feiertag
- func InternationalerTagDerPressefreiheit(year int) Feiertag
- func InternationalerTagDesGedenkensAnDieOpferDesHolocaust(year int) Feiertag
- func InternationalerTagGegenDrogenmissbrauch(year int) Feiertag
- func Josefitag(year int) Feiertag
- func Karfreitag(year int) Feiertag
- func Karnevalsbeginn(year int) Feiertag
- func Karnevalssonntag(year int) Feiertag
- func Leopolditag(year int) Feiertag
- func MariäEmpfängnis(year int) Feiertag
- func MariäHimmelfahrt(year int) Feiertag
- func MariäUnbefleckteEmpfängnis(year int) Feiertag
- func Martinstag(year int) Feiertag
- func Muttertag(year int) Feiertag
- func Nationalfeiertag(year int) Feiertag
- func Neujahr(year int) Feiertag
- func Nikolaus(year int) Feiertag
- func Ostermontag(year int) Feiertag
- func Ostern(year int) Feiertag
- func Palmsonntag(year int) Feiertag
- func Pfingsten(year int) Feiertag
- func Pfingstmontag(year int) Feiertag
- func Reformationstag(year int) Feiertag
- func Rosenmontag(year int) Feiertag
- func Rupertitag(year int) Feiertag
- func Silvester(year int) Feiertag
- func Staatsfeiertag(year int) Feiertag
- func StarWarsDay(year int) Feiertag
- func Stefanitag(year int) Feiertag
- func SystemAdministratorAppreciationDay(year int) Feiertag
- func TagDerArbeit(year int) Feiertag
- func TagDerBefreiung(year int) Feiertag
- func TagDerDeutschenEinheit(year int) Feiertag
- func TagDerErde(year int) Feiertag
- func TagDerVolksabstimmung(year int) Feiertag
- func TagDesMeeres(year int) Feiertag
- func Thanksgiving(year int) Feiertag
- func Totensonntag(year int) Feiertag
- func TowelDay(year int) Feiertag
- func Valentinstag(year int) Feiertag
- func Vatertag(year int) Feiertag
- func VierterAdvent(year int) Feiertag
- func Volkstrauertag(year int) Feiertag
- func Walpurgisnacht(year int) Feiertag
- func Weiberfastnacht(year int) Feiertag
- func Weihnachten(year int) Feiertag
- func Weltblutspendetag(year int) Feiertag
- func Weltflüchtlingstag(year int) Feiertag
- func Weltkindertag(year int) Feiertag
- func Weltknuddeltag(year int) Feiertag
- func Weltmännertag(year int) Feiertag
- func Weltspieltag(year int) Feiertag
- func Weltumwelttag(year int) Feiertag
- func ZweiterAdvent(year int) Feiertag
- func ZweiterWeihnachtsfeiertag(year int) Feiertag
- type Region
- func All(year int, inklSonntage ...bool) Region
- func BadenWürttemberg(year int, inklSonntage ...bool) Region
- func Bayern(year int, inklSonntage ...bool) Region
- func Berlin(year int, inklSonntage ...bool) Region
- func Brandenburg(year int, inklSonntage ...bool) Region
- func Bremen(year int, inklSonntage ...bool) Region
- func Burgenland(year int, inklSonntage ...bool) Region
- func Deutschland(year int, inklSonntage ...bool) Region
- func GetAllRegions(year int, inklSonntag bool, country ...string) (regions []Region)
- func Hamburg(year int, inklSonntage ...bool) Region
- func Hessen(year int, inklSonntage ...bool) Region
- func Kärnten(year int, inklSonntage ...bool) Region
- func MecklenburgVorpommern(year int, inklSonntage ...bool) Region
- func Niedersachsen(year int, inklSonntage ...bool) Region
- func Niederösterreich(year int, inklSonntage ...bool) Region
- func NordrheinWestfalen(year int, inklSonntage ...bool) Region
- func Oberösterreich(year int, inklSonntage ...bool) Region
- func RheinlandPfalz(year int, inklSonntage ...bool) Region
- func Saarland(year int, inklSonntage ...bool) Region
- func Sachsen(year int, inklSonntage ...bool) Region
- func SachsenAnhalt(year int, inklSonntage ...bool) Region
- func Salzburg(year int, inklSonntage ...bool) Region
- func SchleswigHolstein(year int, inklSonntage ...bool) Region
- func Steiermark(year int, inklSonntage ...bool) Region
- func Thüringen(year int, inklSonntage ...bool) Region
- func Tirol(year int, inklSonntage ...bool) Region
- func Vorarlberg(year int, inklSonntage ...bool) Region
- func Wien(year int, inklSonntage ...bool) Region
- func Österreich(year int, inklSonntage ...bool) Region
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultTimeFormat ¶ added in v1.7.0
func SetDefaultTimeFormat(timeformat string)
SetDefaultTimeFormat offers the possibility to change the default format for the ToString function. It defaults to "02.01.2006" The timezone is set at the creation time of the Feiertage object!
func SetDefaultTimeZone ¶ added in v1.7.0
SetDefaultTimeZone lets you set the timezone of the Feiertag functions. Default ist UTC.
Types ¶
type ByDate ¶
type ByDate []Feiertag
ByDate is the comparator object of Feiertag to be able to sort a list of Feiertage
type Feiertag ¶
Feiertag is an extented Time object. You may use it like any Time, but it offers an additional attribute carrying the name of the Feiertag.
func Allerheiligen ¶
Allerheiligen is All Saints' Day or Allhallows, a fixed date
func Allerseelen ¶
Allerseelen is All Souls' Day, the day after All Saints' Day,
func Antikriegstag ¶ added in v1.20.1
Antikriegstag is Anti-War Day, a fixed date.
func Aschermittwoch ¶
Aschermittwoch is Ash Wednesday, 46 days before Easter.
func BeginnSommerzeit ¶
BeginnSommerzeit is the start of daylight saving time. Last Sunday of March.
func BeginnWinterzeit ¶
BeginnWinterzeit is the end of daylight saving time. Last Sunday of October.
func Blackfriday ¶
Blackfriday is the Friday after Thanksgiving.
func BußUndBettag ¶
BußUndBettag is Penance Day, 11 days before the first Sunday in Advent
func ChristiHimmelfahrt ¶
ChristiHimmelfahrt is Ascension Day, 39 days after Easter, therefore always a Thursday.
func Dreifaltigkeitssonntag ¶
Dreifaltigkeitssonntag is Trinity Sunday, the Sunday after Pentecost
func DritterAdvent ¶
DritterAdvent is the third Sunday in Advent
func Erntedankfest ¶
Erntedankfest is Thanksgiving or Harvest Festival, the first Sunday of October. The german Erntedankfest is not the same than the US Thanksgiving.
func Florianitag ¶
Florianitag is St Florian's Day, a fixed date.
func Fronleichnam ¶
Fronleichnam is Corpus Christi, 60 days after Eastern, therefore always a Thursday.
func FêteDeLaMusique ¶ added in v1.11.0
FêteDeLaMusique is World Music Day, a fixed date.
func GetFeiertageForDate ¶ added in v1.13.0
GetFeiertageForDate returns all feiertage (defined dates in this library, even if not a 'gesetzlicher Feiertag') for a given date Example:
f := feiertage.GetFeiertageForDate(time.Date(2025, 6, 8, 1, 0, 0, 0, time.UTC))
fmt.Printf("%s - %s\n", f[0].Time.Format("2006-01-02"), f)
Output:
2025-06-08 - [08.06.2025 Tag des Meeres 08.06.2025 Pfingsten]
func GetFeiertageForDateInRegion ¶ added in v1.13.0
func GetFeiertageForDateInRegion(t time.Time, regionFn func(y int, inklSonntage ...bool) Region, inklSonntage ...bool) []Feiertag
GetFeiertageForDateInRegion retrieves all bank holiday (gesetzliche Feiertage) for a given date in the specified region. Example:
regionfn := feiertage.Brandenburg
f := feiertage.GetFeiertageForDateInRegion(time.Date(2025, 6, 8, 1, 0, 0, 0, time.UTC), regionfn, true)
fmt.Printf("%s - %s: %v\n", f[0].Time.Format("2006-01-02"), regionfn(2025, true).Name, f)
Output:
2025-06-08 - Brandenburg: [08.06.2025 Pfingsten]
func Gründonnerstag ¶
Gründonnerstag is Holy Thursday or Maundy Thursday, the last Thursday before Eastern
func Handtuchtag ¶ added in v1.9.0
Handtuchtag is Towel Day, May 25. It is celebrated as a tribute to the author Douglas Adams by his fans.
func Heiligabend ¶
Heiligabend is Christmas Eve, the last day before Christmas.
func HeiligeDreiKönige ¶
HeiligeDreiKönige is another name for Epiphany, a fixed date.
func InternationalerFrauentag ¶ added in v1.6.1
InternationalerFrauentag is International Women's Day, a fixed date.
func InternationalerKindertag ¶ added in v1.6.1
InternationalerKindertag is special to Germany and Austrian and isnot the same as Weltkindertag (World Children's Day), a fixed date.
func InternationalerMännertag ¶ added in v1.11.0
InternationalerMännertag is International Day Men's Day, a fixed date
func InternationalerTagDerPressefreiheit ¶ added in v1.6.1
InternationalerTagDerPressefreiheit is World Press Freedom Day, a fixed date.
func InternationalerTagDesGedenkensAnDieOpferDesHolocaust ¶ added in v1.6.1
InternationalerTagDesGedenkensAnDieOpferDesHolocaust is (International Holocaust Remembrance Day, a fixed date.
func InternationalerTagGegenDrogenmissbrauch ¶ added in v1.11.0
InternationalerTagGegenDrogenmissbrauch is International Day Against Drug Abuse and Illicit Trafficking, a fixed date.
func Karfreitag ¶
Karfreitag is Good Friday, the last Friday before Easter
func Karnevalsbeginn ¶
Karnevalsbeginn is the beginning of carnival, a fixed date.
func Karnevalssonntag ¶
Karnevalssonntag is the sunday of carnival, 49 days before Easter.
func Leopolditag ¶
Leopolditag is St Leopold's Day, a fixed date.
func MariäEmpfängnis ¶
MariäEmpfängnis has a shorter name for MariäUnbefleckteEmpfängnis in Austria.
func MariäHimmelfahrt ¶
MariäHimmelfahrt is Assumption Day, a fixed date.
func MariäUnbefleckteEmpfängnis ¶
MariäUnbefleckteEmpfängnis is Day of Immaculate Conception, a fixed date.
func Martinstag ¶
Martinstag or Skt. Martin is Martinmas, a fixed date
func Nationalfeiertag ¶
Nationalfeiertag is the Austrian national day, a fixed date.
func Ostermontag ¶
Ostermontag is Easter Monday, the Monday after Easter.
func Palmsonntag ¶
Palmsonntag is Palm Sunday , the last Sunday before Easter
func Pfingstmontag ¶
Pfingstmontag is Whit Monday, the monday after Pentecost.
func Reformationstag ¶
Reformationstag is Reformation Day, a fixed date.
func Rosenmontag ¶
Rosenmontag is the monday of carnival, 48 days before Easter.
func Staatsfeiertag ¶
Staatsfeiertag is May 1st in Austria, a fixed date.
func StarWarsDay ¶ added in v1.11.0
StarWarsDay is a fixed date.
func SystemAdministratorAppreciationDay ¶ added in v1.9.0
SystemAdministratorAppreciationDay is the last Fridy in July
func TagDerBefreiung ¶
TagDerBefreiung is Victory in Europe Day, a fixed date.
func TagDerDeutschenEinheit ¶
TagDerDeutschenEinheit is German Unity Day, a fixed date.
func TagDerErde ¶ added in v1.11.0
TagDerErde is Earth Day, a fixed date.
func TagDerVolksabstimmung ¶
TagDerVolksabstimmung is Referendum Day in Carinthia, a fixed date.
func TagDesMeeres ¶ added in v1.6.1
TagDesMeeres is World Oceans Day, a fixed date.
func Thanksgiving ¶
Thanksgiving in the US, the fourth Thursday of November.
func Totensonntag ¶
Totensontag is Sunday in commemoration of the dead, the last Sunday before the fourth Sunday in Advent
func TowelDay ¶ added in v1.9.0
TowelDay is, May 25. It is celebrated as a tribute to the author Douglas Adams by his fans.
func Valentinstag ¶
Valentinstag is Valentine's Day, a fixed date.
func Vatertag ¶
Vatertag is Father's Day, same day a Ascension Day, 39 days after Easter, therefore always a Thursday.
func VierterAdvent ¶
VierterAdvent is the fourth Sunday in Advent
func Volkstrauertag ¶
Volkstrauertag is Remembrance Sunday, the second sunday before the first Sunday in Advent
func Walpurgisnacht ¶
Walpurgisnacht is Walpurgis Night, a fixed date.
func Weiberfastnacht ¶
Weiberfastnacht is a part of carnival, 52 days before Easter.
func Weltblutspendetag ¶ added in v1.11.0
Weltblutspendetag is World Blood Donor Day, a fixed date.
func Weltflüchtlingstag ¶ added in v1.6.1
Weltflüchtlingstag is World Refugee Day, a fixed date.
func Weltkindertag ¶ added in v1.6.1
Weltkindertag is World Children's Day, a fixed date.
func Weltknuddeltag ¶ added in v1.11.0
Weltknuddeltag is World Hug Day or National Hugging Day, a fixed date.
func Weltmännertag ¶ added in v1.14.0
Weltmännertag is Men's World Day.
func Weltspieltag ¶ added in v1.11.0
Weltspieltag is International Day of Play, a fixed date.
func Weltumwelttag ¶ added in v1.11.0
Weltumwelttag is World Environment Day, a fixed date.
func ZweiterAdvent ¶
ZweiterAdvent is the second Sunday in Advent
func ZweiterWeihnachtsfeiertag ¶
ZweiterWeihnachtsfeiertag is day after Christmas, a fixed date
func (Feiertag) MarshalJSON ¶ added in v1.16.0
type Region ¶
type Region struct {
Name string `json:"region"`
Shortname string `json:"-"`
Feiertage []Feiertag `json:"feiertage"`
}
Region represents a Federal State of Germany or Austria (Bundesland). Some public holidays are common throughout the whole country, while others depend on the Bundesland. Short names of Austrian states are as suggested in ÖNORM A 1080.
func All ¶
All returns a Region object holding all public holidays/feast days known to this program. Not all of them are public holidays (basically 'work free' days).
func BadenWürttemberg ¶
BadenWürttemberg returns a Region object holding all public holidays in the state Baden-Württemberg
func Brandenburg ¶
Brandenburg returns a Region object holding all public holidays in the state Brandenburg
func Burgenland ¶
Burgenland returns a Region object holding all public holidays in the state of Burgenland.
func Deutschland ¶
Deutschland returns a Region object holding all public holidays that are Common in Germany
func GetAllRegions ¶ added in v1.8.0
GetAllRegions returns a list of all regions available. These may be filtered by providing the country ("de"|"at"|empty)
func MecklenburgVorpommern ¶
MecklenburgVorpommern returns a Region object holding all public holidays in the state Mecklenburg-Vorpommern
func Niedersachsen ¶
Niedersachsen returns a Region object holding all public holidays in the state Niedersachsen
func Niederösterreich ¶
Niederösterreich returns a Region object holding all public holidays in the state of Niederösterreich.
func NordrheinWestfalen ¶
NordrheinWestfalen returns a Region object holding all public holidays in the state Nordrhein-Westfalen
func Oberösterreich ¶
Oberösterreich returns a Region object holding all public holidays in the state of Oberösterreich.
func RheinlandPfalz ¶
RheinlandPfalz returns a Region object holding all public holidays in the state Rheinland-Pfalz
func SachsenAnhalt ¶
SachsenAnhalt returns a Region object holding all public holidays in the state SachsenAnhalt
func Salzburg ¶
Salzburg returns a Region object holding all public holidays in the state of Salzburg.
func SchleswigHolstein ¶
SchleswigHolstein returns a Region object holding all public holidays in the state SchleswigHolstein
func Steiermark ¶
Steiermark returns a Region object holding all public holidays in the state of Steiermark.
func Thüringen ¶
Thüringen returns a Region object holding all public holidays in the state Thüringen
func Vorarlberg ¶
Vorarlberg returns a Region object holding all public holidays in the state of Vorarlberg.
func Wien ¶
Wien returns a Region object holding all public holidays in the city and state of Vienna.
func Österreich ¶
Österreich returns a Region object holding all public holidays that are common in Austria.