Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungThe AI Interview Paradox: Decoupling Skill Assessment from Tool Usage(21.09.2026 um 02:01 Uhr)
Sichere ProgrammierungI Built a 100% Free AI Toolbox with No Sign-Up (Here's How)(21.09.2026 um 02:02 Uhr)
Sichere ProgrammierungUnreal C++ Course Chapter 109(21.09.2026 um 02:02 Uhr)
Sichere ProgrammierungWhen Your Impact Is No Longer Measured in Pull Requests(21.09.2026 um 02:04 Uhr)
Sichere ProgrammierungHow to choose a used FortiGate firewall (without getting burned)(21.09.2026 um 02:18 Uhr)
Sichere ProgrammierungC# basic JsonConverter tip(21.09.2026 um 02:35 Uhr)
KI & AI VideosJulian Goldie SEO: Qwen Image 2.1 is NOW Free! 🤯(21.09.2026 um 02:00 Uhr)
Sichere ProgrammierungThe AI Interview Paradox: Decoupling Skill Assessment from Tool Usage(21.09.2026 um 02:01 Uhr)
Sichere ProgrammierungI Built a 100% Free AI Toolbox with No Sign-Up (Here's How)(21.09.2026 um 02:02 Uhr)
Sichere ProgrammierungUnreal C++ Course Chapter 109(21.09.2026 um 02:02 Uhr)
Sichere ProgrammierungWhen Your Impact Is No Longer Measured in Pull Requests(21.09.2026 um 02:04 Uhr)
Sichere ProgrammierungHow to choose a used FortiGate firewall (without getting burned)(21.09.2026 um 02:18 Uhr)
Sichere ProgrammierungC# basic JsonConverter tip(21.09.2026 um 02:35 Uhr)
KI & AI VideosJulian Goldie SEO: Qwen Image 2.1 is NOW Free! 🤯(21.09.2026 um 02:00 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How to Check if a Date is a Business Day in Any Country (With Code Examples)

Reagiere als Erste:r — dein Feedback zählt!

Building an app that handles scheduling, invoicing, or delivery estimates? You'll need to know if a given date is a business day - and that's trickier than it sounds when you're dealing with multiple countries.

The Problem

A "business day" isn't universal:

  • Weekends vary: Saturday-Sunday in most countries, Friday-Saturday in UAE/Israel
  • Public holidays differ: France has 11, Japan has 16, the US has 11 federal holidays
  • Regional holidays exist: Bavaria (Germany) has holidays that don't apply in Berlin

Writing this logic from scratch means maintaining holiday calendars for 100+ countries. That's a maintenance nightmare.

The Solution: Use an API

Instead of hardcoding holiday data, call an API that handles it for you. Here's how to check if a date is a business day using the Public Holidays & Business Days API:

JavaScript/Node.js

const response = await fetch(
  'https://public-holidays-business-days-api.p.rapidapi.com/is-business-day?country=FR&date=2026-05-01',
  {
    headers: {
      'X-RapidAPI-Key': 'YOUR_API_KEY',
      'X-RapidAPI-Host': 'public-holidays-business-days-api.p.rapidapi.com'
    }
  }
);

const data = await response.json();
console.log(data);
// {
//   "date": "2026-05-01",
//   "country": "FR",
//   "isBusinessDay": false,
//   "reasons": [{ "type": "public_holiday", "name": "Labour Day", "localName": "Fête du Travail" }]
// }

Python

import requests

response = requests.get(
    'https://public-holidays-business-days-api.p.rapidapi.com/is-business-day',
    params={'country': 'FR', 'date': '2026-05-01'},
    headers={
        'X-RapidAPI-Key': 'YOUR_API_KEY',
        'X-RapidAPI-Host': 'public-holidays-business-days-api.p.rapidapi.com'
    }
)

data = response.json()
print(f"Is business day: {data['isBusinessDay']}")
# Is business day: False

Get the Next N Business Days

Need to calculate "delivery in 5 business days"? The API handles that too:

const response = await fetch(
  'https://public-holidays-business-days-api.p.rapidapi.com/next-business-day?country=US&date=2026-12-23&days=3',
  { headers: { 'X-RapidAPI-Key': 'YOUR_API_KEY', 'X-RapidAPI-Host': 'public-holidays-business-days-api.p.rapidapi.com' } }
);

const data = await response.json();
console.log(data.nextBusinessDays);
// ["2026-12-26", "2026-12-29", "2026-12-30"]
// (skips Dec 24-25 Christmas holidays and weekends)

List All Public Holidays

Get all holidays for a country and year:

const response = await fetch(
  'https://public-holidays-business-days-api.p.rapidapi.com/holidays?country=DE&year=2026',
  { headers: { 'X-RapidAPI-Key': 'YOUR_API_KEY', 'X-RapidAPI-Host': 'public-holidays-business-days-api.p.rapidapi.com' } }
);

const data = await response.json();
console.log(`Germany has ${data.count} public holidays in 2026`);

Why Not Build It Yourself?

You could use libraries like date-holidays (npm) or holidays (Python), but:

  1. Data gets stale - holidays change (UK added a bank holiday in 2022 for the Queen's funeral)
  2. Edge cases - some holidays are "observed" on different days when they fall on weekends
  3. Regional variations - the API handles sub-regions (US states, German Länder)

An API abstracts this complexity. You get accurate, up-to-date data without maintaining it yourself.

Pricing

The WorkDay API offers:

  • Free tier: 1,000 requests/month (enough for testing)
  • Pro: $9/month for 25,000 requests
  • Ultra: $29/month for 200,000 requests

Compare that to building and maintaining your own holiday database across 100+ countries.

Try It

  1. Sign up on RapidAPI
  2. Subscribe to the Public Holidays & Business Days API (free tier available)
  3. Make your first request

Building something that needs business day calculations? Drop a comment - I'd love to hear your use case.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Check if a Date is a Business Day in Any Country (With Code Examples)

Thematisch verwandte Begriffe: Check, Date, Business, Country · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-93968 | A vulnerability was determined in aiyiyi121 SxDevOps 1.0/1.1. This affec…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick