{
  "id": 22755833,
  "title": "Counting working days in Germany is harder than it looks",
  "url": "https://urgent.news/2026/11/30/counting-working-days-in-germany-is-harder-than-it-looks",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-30T09:14:29.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mugheesahmad/counting-working-days-in-germany-is-harder-than-it-looks-36oc"
  },
  "original_language": null,
  "account": "Calculating working days in Germany proves to be a more complex task than one might expect. The German state system is riddled with regional variations. Each of the 16 federal states boasts its own public holidays, with a handful of holidays only observed in specific towns. Nine holidays, including New Year, Good Friday, Easter Monday, 1 May, Ascension Day, Whit Monday, German Unity Day, and Christmas Day, are universally celebrated across all states.\n\nBeyond these common holidays, each state adds its own unique observances. For instance, Berlin and Mecklenburg-Vorpommern commemorate International Women's Day on March 8th. Thuringia observes World Children's Day on September 20th. Saxony designates Buß- und Bettag, or 'Day of Repentance and Fasting,' which varies annually as it falls on the Wednesday preceding November 23rd.\n\nThe calculation's complexity is further amplified by the fact that some holidays move based on Easter Sunday. Consequently, the developer crafted an Easter calculation using the Meeus/Jones/Butcher algorithm, along with a catalog of offsets: Good Friday is two days prior to Easter, Ascension is 39 days after Easter, Whit Monday is 50 days after Easter, and Corpus Christi is 60 days post-Easter.\n\nCertain holidays are specific to certain towns or municipalities. Assumption Day on August 15th is celebrated throughout Saarland but only in Catholic-majority municipalities in Bavaria. Similarly, Corpus Christi is observed in six states and certain towns in Saxony and Thuringia. Augsburg has its own unique holiday on August 8th.\n\nGiven these regional discrepancies, a calculator that covers an entire state cannot account for the town-specific holidays without user intervention. Hence, these optional holidays are disabled by default, and users must manually switch them on. For example, to include Assumption Day in the 2027 Bavarian calculation, the user would specify 'assumption : true'.\n\nOne additional peculiarity pertains to Brandenburg. Here, Easter Sunday and Whit Sunday are considered public holidays. This rule is crucial for those who work on Sundays, as it adjusts the count by an additional two days annually.\n\nTo prevent time zone discrepancies from affecting date calculations, the developer opted to work with UTC timestamps. Each date in the system is a midnight timestamp in UTC, and advancing a day involves adding 86,400,000 milliseconds. This approach ensures accuracy by eliminating any potential influence from local time zones or daylight saving changes.\n\nThe final step involves tallying each day, checking if it's a working day, a holiday, or an absence. The system prioritizes this sequence: is it a workday at all, is it a holiday, and finally, is it an absence? The first match determines the day's status. The library also provides a per-month breakdown of working days and includes a verification test to ensure that the annual total matches the sum of monthly totals for every state from 2026 to 2030.\n\nThe developer has made the library available under the MIT license, encouraging others to contribute by submitting issues and pull requests on GitHub at github.com/MugheesAhmad/feiertage-bundeslaender.",
  "summary": "I run stundenrechner.online , a set of free German calculators for working hours, Minijob limits and vacation days. The calculator that needed the most care was the one that counts working days between two dates. Germany has 16 federal states, each with its own public holidays, and a few holidays that only apply in some towns. Here is what I ran into, and the small library that came out of it.…",
  "summary_source": "publisher",
  "key_points": [
    "Germany's working days complex due to regional variations",
    "Nine nationwide holidays, plus state-specific observances",
    "Developer used Easter algorithm, town-specific holidays"
  ],
  "editors_take": "Regional holiday variations and town-specific observances mean users must manually adjust settings to ensure their working day calculations remain accurate across different German states.",
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}