Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Holidays Laravel Package

spatie/holidays

Calculate public holidays for supported countries using ISO codes or country classes. Get an array of Holiday objects with name, CarbonImmutable date, and type (e.g., national). PHP 8.4+ package by Spatie, with extensible country definitions.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Development: Enables accurate holiday date calculations for scheduling, leave policies, and business logic (e.g., "close X days before/after holidays").
  • Global Expansion Roadmap: Critical for multi-country deployments (e.g., SaaS platforms, HR tools, or logistics apps targeting regions with unique holiday rules).
  • Build vs. Buy: Avoids reinventing holiday logic (e.g., handling regional variations like Germany’s state-specific holidays or observed holidays).
  • Use Cases:
    • HR Systems: Automate leave approvals or payroll adjustments (e.g., "skip payroll on observed holidays").
    • E-commerce: Adjust shipping deadlines or promotions (e.g., "disable checkout 2 days before Christmas").
    • Calendar Apps: Sync holidays with Google Calendar or Outlook (e.g., "flag long weekends").
    • Legal/Compliance: Ensure adherence to labor laws (e.g., "mandatory closures in Spain’s autonomous regions").

When to Consider This Package

  • Adopt if:

    • Your app requires holiday-aware logic (e.g., scheduling, notifications, or workflows).
    • You support multiple countries/regions with distinct holiday rules (e.g., US federal vs. state holidays).
    • You need localized holiday names (e.g., "New Year’s Day" → "Jour de l’An").
    • Your team lacks resources to maintain custom holiday logic (e.g., Easter calculations, observed holidays).
    • You require long-weekend detection for travel/booking apps.
  • Look elsewhere if:

    • You only need static holiday lists (e.g., a hardcoded array suffices).
    • Your app is country-agnostic (e.g., internal tools with no user-facing holiday displays).
    • You need real-time holiday updates (e.g., last-minute government changes; this package uses precomputed data).
    • Your stack doesn’t support PHP/Laravel (e.g., Python/Node.js ecosystems have alternatives like holidays.py or date-fns).

How to Pitch It (Stakeholders)

For Executives: "This package eliminates manual holiday maintenance—a common pain point in global apps. For example, a US-based SaaS company using this could automatically adjust support hours for German users during Bavaria’s regional holidays without custom code. It’s a low-cost, high-impact way to improve user experience and compliance, with zero ongoing maintenance."

For Engineering: *"Spatie’s holidays package provides a batteries-included solution for holiday logic:

  • Pre-built support for 200+ countries/regions (e.g., Germany’s 16 states, Brazil’s 27 regions).
  • Flexible APIs: Fetch holidays by year, date range, or type (national/regional/religious).
  • Extensible: Add unsupported countries via PRs or custom classes.
  • Performance: Uses Carbon for date handling (no external DB calls).
  • Localization: Built-in translations for 10+ languages. Example use case: Replace a bloated switch-case holiday checker with Holidays::for('jp')->getInRange('2024-01-01', '2024-12-31')—cleaner, more maintainable, and always up-to-date."*

For Product: *"This enables features like:

  • Smart scheduling: ‘Book a meeting 3 days before a long weekend’ (e.g., US Memorial Day).
  • Localized UX: Display holidays in users’ native languages (e.g., ‘Fête du Travail’ for French users).
  • Proactive notifications: ‘Your order ships tomorrow—holidays may delay delivery in [Country].’ No more ‘holiday bugs’ (e.g., payroll processed on Christmas) or last-minute fixes."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi