ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - wlbr/feiertage: Gesetzliche Feiertage und mehr in Deutschland und Österreich (Bank holidays/public holidays in Austria and Germany)
Gesetzliche Feiertage und mehr in Deutschland und Österreich (Bank holidays/public holidays in Austria and Germany) - wlbr/feiertage
Visit Site

GitHub - wlbr/feiertage: Gesetzliche Feiertage und mehr in Deutschland und Österreich (Bank holidays/public holidays in Austria and Germany)

GitHub - wlbr/feiertage: Gesetzliche Feiertage und mehr in Deutschland und Österreich (Bank holidays/public holidays in Austria and Germany)

Feiertage

Feiertage is a Go/Golang library for calculating German and Austrian bank holidays. It includes the calculation of the date of Easter and, more importantly, offers ways to retrieve public holidays for a state of Germany or Austria (=Bundesland).

The library is probably useful only for people realizing use cases with special requirements inside of Austria or Germany, such as shift schedules or capacity calculation.

Documentation

See https://godoc.org/github.com/wlbr/feiertage

Usage:

There are two types of functions:

  • <feiertag>(year) and
  • <region>(year optional:IncludingSundays:true)

<feiertag> returns an extended time object (type feiertag). It carries the date of the holiday in the requested year plus the name of the holiday. <feiertag> may be any of the following:

Neujahr Epiphanias HeiligeDreiKönige
Valentinstag InternationalerTagDesGedenkensAnDieOpferDesHolocaust Josefitag
Weiberfastnacht Karnevalssonntag Rosenmontag
Fastnacht Aschermittwoch InternationalerFrauentag
Palmsonntag Gründonnerstag Karfreitag
Ostern BeginnSommerzeit Ostermontag
Walpurgisnacht TagDerArbeit TagDerBefreiung
Staatsfeiertag InternationalerTagDerPressefreiheit Florianitag
Muttertag Handtuchtag ChristiHimmelfahrt
Vatertag Pfingsten Pfingstmontag
Dreifaltigkeitssonntag Fronleichnam TagDesMeeres
MariäHimmelfahrt SystemAdministratorAppreciationDay Rupertitag
InternationalerKindertag Weltflüchtlingstag TagDerDeutschenEinheit
TagDerVolksabstimmung Nationalfeiertag Erntedankfest
Reformationstag Halloween BeginnWinterzeit
Allerheiligen Allerseelen Martinstag
Karnevalsbeginn Leopolditag Weltkindertag
BußUndBettag Thanksgiving Blackfriday
Volkstrauertag Nikolaus MariäUnbefleckteEmpfängnis
MariäEmpfängnis Totensonntag ErsterAdvent
ZweiterAdvent DritterAdvent VierterAdvent
Heiligabend Weihnachten Christtag
Stefanitag ZweiterWeihnachtsfeiertag Silvester

<region> returns an object of type region. It offers a list of public holidays valid in the specified state as well as the name and the shortname of the state as attributes. <region> may be any of:

BadenWürttemberg Bayern Berlin
Brandenburg Bremen Hamburg
Hessen MecklenburgVorpommern Niedersachsen
NordrheinWestfalen RheinlandPfalz Saarland
Sachsen SachsenAnhalt SchleswigHolstein
Thüringen Deutschland Burgenland
Kärnten Niederösterreich Oberösterreich
Salzburg Steiermark Tirol
Vorarlberg Wien Österreich
All    

The optional region function argument includingSundays switches the behavior of the region function to include "gesetzliche Feiertage" that fall on Sundays in its output. This is important in Brandenburg, particularly for Easter and Pentecost Sunday. If you are calculating shift costs you will need to know even the holidays "hidden by Sunday".

The region functions return the public holidays ("gesetzliche Feiertage"). The function all returns all defined "special dates", such as Penance Day (Buß- und Bettag) or the begin/end of daylight saving time.

The regional functions for Austrian Bundesländer include saints' days which are state-level holidays, meaning schools etc. are generally closed but workers don't get the day off by default. If you don't want to include these days in your planning, it's okay to reference Österreich instead, as legal holidays are (more or less) synchronised across all Austrian states (Bundesländer).

Examples:

fmt.Println(Ostern(2016))
--> 27.03.2016 Ostern


fmt.Println(BußUndBettag(2016))
--> 16.11.2016 Buß- und Bettag



fmt.Println(Brandenburg(2016))
--> Brandenburg (BB)
    01.01.2016 Neujahr
    25.03.2016 Karfreitag
    27.03.2016 Ostern
    28.03.2016 Ostermontag
    01.05.2016 Tag der Arbeit
    05.05.2016 Christi Himmelfahrt
    15.05.2016 Pfingsten
    16.05.2016 Pfingstmontag
    03.10.2016 Tag der deutschen Einheit
    31.10.2016 Reformationstag
    25.12.2016 Weihnachten
    26.12.2016 Zweiter Weihnachtsfeiertag


fmt.Println(Brandenburg(2016, false))
--> Brandenburg (BB)
    01.01.2016 Neujahr
    25.03.2016 Karfreitag
    28.03.2016 Ostermontag
    01.05.2016 Tag der Arbeit
    05.05.2016 Christi Himmelfahrt
    16.05.2016 Pfingstmontag
    03.10.2016 Tag der deutschen Einheit
    31.10.2016 Reformationstag
    25.12.2016 Weihnachten
    26.12.2016 Zweiter Weihnachtsfeiertag

Command line tool

A little command line tool is included as well. It can be compiled using make buildcmd or go build cmd/feiertage/feiertage.go This will create an executable feiertage.

See https://github.com/wlbr/feiertage/releases/latest for downloads.

Synopsis

feiertage: [options] year

Code

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory