Gesetzliche Feiertage und mehr in Deutschland und Österreich (Bank holidays/public holidays in Austria and Germany)

Overview

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

-asTaskjugglerCode (default false)
Print the result as valid source code (`leave x y`) for the Taskjuggler planning tool.
-inklusiveSonntage (default false)
Should public holidays on a Sunday be included?
-region <regionstring> (default "All")
Return public holidays for region ``.
<regionstring> may be (case insensitive, plus some other tricks to make it more tolerant):
 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

Code

Issues
  • Add support for Austria

    Add support for Austria

    Added support for holidays per-Bundesland in Austria, updated documentation and tests to match. Proofread and tidied README.md. Thanks for writing the original, it was just what I needed for automatic oncall shift planning..

    opened by uffish 3
  • Add new Feiertag in Berlin (

    Add new Feiertag in Berlin ("Internationaler Frauentag")

    There is a new Feiertag in Berlin from 2019 on. You will want to add it.

    https://www.berlin.de/special/familien/5597854-2864562-frauentag-8-maerz-neuer-feiertag.html

    opened by iiiw 2
  • How to compile just the command line program?

    How to compile just the command line program?

    Could you add info on how to compile if I just want the commandline program and don't know anything about go? I append my solution but it looks odd to me. :-)

    mkdir -p src/github.com/wlbr
    cd src/github.com/wlbr
    ln -s ../../../ feiertage
    cd -
    GOPATH="${PWD}" make buildcmd
    
    opened by tastytea 2
Releases(v1.10.0)
Owner
Michael Wolber
Nützt ja nix.
Michael Wolber
:clock1: Date and Time - Golang Formatting Library

Kair Date and Time - Golang Formatting Library Setup To get Kair > Go CLI go get github.com/GuilhermeCaruso/kair > Go DEP dep ensure -add github.com/G

Guilherme Caruso 23 Mar 15, 2022
A simple, semantic and developer-friendly golang package for datetime

Carbon 中文 | English carbon 是一个轻量级、语义化、对开发者友好的 Golang 时间处理库,支持链式调用和 gorm、xorm、zorm 等主流 orm。 如果您觉得不错,请给个 star 吧 github:github.com/golang-module/carbon g

null 2.2k Aug 5, 2022
Copy of stdlib's time.Duration, but ParseDuration accepts other bigger units such as days, weeks, months and years

duration Copy of stdlib's time.Duration, but ParseDuration accepts other units as well: d: days (7 * 24 * time.Hour) w: weeks (7 * Day) mo: months (30

Carlos Alexandro Becker 11 Jun 21, 2022
Focus is a fully featured productivity timer for the command line, based on the Pomodoro Technique. Supports Linux, Windows, and macOS.

Focus is a cross-platform productivity timer for the command line. It is based on the Pomodoro Technique, a time management method developed by Francesco Cirillo in the late 1980s.

Ayooluwa 162 Aug 4, 2022
An online, full fledged bank system - ATM, online bank, transactions, bank cards

Bank An online, full fledged bank system - ATM, online bank, transactions, bank cards Online Bank: The online banking system can be used to send trans

Glaukio 3 Apr 2, 2022
Suricate-bank - API to transfer money between accounts at Suricate Bank,written in Go

⚠️ WORK IN PROGRESS ⚠️ Suricate Bank is an api that creates accounts and transfe

João Saraceni 11 May 8, 2022
A quick and dirty hacked tool to query RIL100/DS100 abbreviations from the DB (Deutsche Bahn) in Germany.

go-ril100 A quick and dirty hacked tool to query RIL100/DS100 abbreviations from the DB (Deutsche Bahn) in Germany. usage text output $> go-ril100 DFL

Christian Richter 0 Jul 28, 2022
Vat ID Validator for Germany

German Vat Validator service This project has been developed using Hexagonal architecture and repository pattern. How to run? docker-compose up -d Cal

Omid Tavakoli 0 Nov 4, 2021
Give developers an easy way to create and integrate bank processing into their own software products

Community · Blog moov-io/bankcron Moov's mission is to give developers an easy way to create and integrate bank processing into their own software pro

moov 3 Mar 9, 2022
Sync your bank transactions with google sheets using Open Banking APIs

Sync your bank transactions with google sheets using Open Banking APIs

Alex Russell-Saw 30 Jul 22, 2022
Sync your bank transactions with google sheets using Open Banking APIs

this is a markdown version of the copy on the site landing page: https://youneedaspreadsheet.com You need a spreadsheet ?? Get on top of your finances

Alex Russell-Saw 30 Jul 22, 2022
Simple Bank is a simple REST API that allows users to perform transferences with each other.

Simple Bank is a simple REST API that allows users to perform transferences with each other. ?? Technologies Golang Docker PostgreSQ

Matheus Mosca 12 Feb 15, 2022
Inter Blockchain Bank @cosmos

Interstellar Interstellar is a blockchain built using Cosmos SDK and Tendermint and created with Starport. Interstellar provides borrowing services fo

Sapeins-cosmos 8 May 16, 2022
simple bank which is implemented using Golang

Banker The service that we’re going to build is a simple bank. It will provide APIs for the frontend to do following things: Create and manage bank ac

null 1 Nov 15, 2021
Hexagonal architecture bank account example

Hexagonal architecture bank account example Esse repositório contém um pouco dos meus estudos sobre arquitetura hexagonal. Go Lang é a linguagem utili

João Paulo Vanzuita 8 Jan 8, 2022
http-theft-bank-LiujJian created by GitHub Classroom

http-theft-bank-start-template 木犀银行抢劫游戏模版 hope this can help you http-theft-bank-start-template To begin with Tips 附录 http URL http 工作流程 http 协议方法 HTT

null 0 Dec 2, 2021
A Simple Bank Web Service implemented in Go, HTTP & GRPC, PostgreSQL, Docker, Kubernetes, GitHub Actions CI

simple-bank Based on this Backend Master Class by TECH SCHOOL: https://youtube.com/playlist?list=PLy_6D98if3ULEtXtNSY_2qN21VCKgoQAE Requirements Insta

Tien La 0 Dec 9, 2021
Bank-End Master Class [ Golang, Postges, Docker ]

Simple Bank This repository contains the codes of the Backend master class course by TECH SCHOOL. In this backend master class, we’re going to learn e

anousone worlakoumman 0 Dec 14, 2021
Iran National Id, Bank Card Number, Mobile Number Validator for golang

Iran IDValidator Iran National Id, Bank Card Number, Mobile Number Validator for golang Installation go get -u github.com/mohammadv184/idvalidator Us

Mohammad Abbasi 1 Dec 20, 2021
Simplebank - A simple bank with golang

Simple-Bank The service that we’re going to build is a simple bank. It will prov

Sandeep 1 Feb 1, 2022
ConsenSys Software 8 Jan 18, 2022
rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org account access, and private resources.

rpCheckup - Catch AWS resource policy backdoors like Endgame rpCheckup is an AWS resource policy security checkup tool that identifies public, externa

Gold Fig Labs Inc. 143 Jun 21, 2022
Go Web UI Toolkit - Public Releases and Development

Welcome! Gowut (Go Web UI Toolkit) is a full-featured, easy to use, platform independent Web UI Toolkit written in pure Go, no platform dependent nati

András Belicza 279 Jul 17, 2022
A bot based on Telegram Bot API written in Golang allows users to download public Instagram photos, videos, and albums without receiving the user's credentials.

InstagramRobot InstagramRobot is a bot based on Telegram Bot API written in Golang that allows users to download public Instagram photos, videos, and

FTC Team 8 Dec 16, 2021
checkip is a CLI tool and library that checks an IP address using various public services.

checkip is a CLI tool and library that checks an IP address using various public services.

Jozef Reisinger 171 Jul 27, 2022
Git watchdog will scan your public repository and find out the vulnerabilities

Dependencies Docker Go 1.17 MySQL 8.0.25 Bootstrap Run chmod +x start.sh if start.sh script does not have privileged to run Run ./start.sh --bootstrap

Quang Nguyen 2 Dec 30, 2021
A Terraform provider to get your current public IPv6 and/or IPv4.

Public IP Terraform Provider This Terraform provider connects to ifconfig.co to fetch information about the public IP in use. It was mainly built to a

nxt Engineering GmbH 0 Jan 25, 2022
Creates a linux group of users synced to your Google Workspace users and automatically imports their public SSH keys.

Creates a linux group of users synced to your Google Workspace users and automatically imports their public SSH keys.

Dane Tuso 1 Jan 27, 2022
Program to fetch public IP ranges of AWS, Azure and Google

cloudip This program will retrieve a list of all public IP address ranges (v4 or v6) for the three major cloud vendors: Amazon AWS, Microsoft Azure an

Scott Ware 2 May 24, 2022