PHPackages                             select-co/module-holiday-dates - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. select-co/module-holiday-dates

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

select-co/module-holiday-dates
==============================

N/A

1.0.3(11mo ago)010ProprietaryPHP

Since Jul 23Pushed 6mo agoCompare

[ Source](https://github.com/SelectCo/magento2-module-holiday-dates)[ Packagist](https://packagist.org/packages/select-co/module-holiday-dates)[ RSS](/packages/select-co-module-holiday-dates/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (2)Versions (3)Used By (0)

SelectCo Holiday Dates
======================

[](#selectco-holiday-dates)

This Magento 2 module provides public holiday dates for use in delivery scheduling, order cutoff logic, and other date-based functionality.

The module retrieves up-to-date public holiday information from an external public API, removing the need to manually maintain holiday calendars.

It provides:

- Admin configuration for the source API and locale (country/sub‑country)
- Storage of holiday dates in a dedicated entity
- CLI commands to fetch/update and purge stored dates
- Helper methods to retrieve configured values and the list of dates for application code
- Admin UI (grid/form) to review/manage dates
- Retrieves public holidays by country and year
- Uses ISO 3166-1 alpha-2 country codes
- Automatically stays current with official holiday data
- Suitable for delivery date logic, blackout dates, and scheduling rules
- Lightweight and easy to integrate

Holiday Data Source
-------------------

[](#holiday-data-source)

This module uses the Nager.Date public API as its source of public holiday data.

Nager.Date is an open-source project that provides official public holiday information for countries worldwide.

Project repository:

Documentation:

### How It Works

[](#how-it-works)

Holiday data is retrieved via the Nager.Date REST API using the following endpoint pattern:

```
https://date.nager.at/api/v3/publicholidays/{year}/{countryCode}

```

Where:

- year is the calendar year (e.g. 2025)
- countryCode is an ISO 3166-1 alpha-2 country code (e.g. US, GB, DE)

The API returns a JSON response containing public holiday dates, which are then used by the module within Magento. No authentication is required to access the Nager.Date public API.

Requirements
------------

[](#requirements)

- Magento 2 (tested with 2.3.5)
- PHP compatible with your Magento version
- Composer dependency: select-co/module-core ^1.0.2

Installation
------------

[](#installation)

You can install this module either via Composer or by placing it in app/code.

### Composer (preferred)

[](#composer-preferred)

1. Require the package:
    - `composer require select-co/module-holiday-dates`
2. Enable and set up the module:
    - `bin/magento module:enable SelectCo_HolidayDates`
    - `bin/magento setup:upgrade`
    - In production mode: `bin/magento setup:di:compile` and `bin/magento setup:static-content:deploy -f`

### Manual installation (app/code)

[](#manual-installation-appcode)

1. Copy this directory to `app/code/SelectCo/HolidayDates`.
2. Run:
    - `bin/magento module:enable SelectCo_HolidayDates`
    - `bin/magento setup:upgrade`
    - In production mode: `bin/magento setup:di:compile` and `bin/magento setup:static-content:deploy -f`

Configuration
-------------

[](#configuration)

Admin Path: Stores &gt; Configuration &gt; SelectCo &gt; Holiday Dates

Fields:

- Enabled (selectco\_hd/general/enabled)
- API Base Url (selectco\_hd/general/api\_url)
- Warehouse Country Code, e.g. GB, US, AU (selectco\_hd/general/country\_code)
- Warehouse Sub Country Code, e.g. ENG, NSW (selectco\_hd/general/sub\_country\_code)
- Years In Advance to fetch (selectco\_hd/general/years)
- Months History to keep (selectco\_hd/general/months\_history)

Save config, then run the update command to fetch dates.

CLI Commands
------------

[](#cli-commands)

- Update dates from the configured API:
    - `bin/magento holidaydates:update`
- Purge stored dates (according to retention rules):
    - `bin/magento holidaydates:purge`

You may schedule these commands with cron as needed.

Programmatic Usage
------------------

[](#programmatic-usage)

Inject the helper SelectCo\\HolidayDates\\Helper\\Data where needed.

Example (PHP):

```
public function __construct(\SelectCo\HolidayDates\Helper\Data $helper)
{
    $this->holidayHelper = $helper;
}

if ($this->holidayHelper->isModuleEnabled()) {
    $dates = $this->holidayHelper->getHolidayDates(); // ["2025-12-25", "2025-12-26", ...]
    $apiUrl = $this->holidayHelper->getApiUrl();
    $country = $this->holidayHelper->getCountryCode();
    $region = $this->holidayHelper->getSubCountryCode();
}

```

getHolidayDates() returns an array of date strings (Y-m-d) from the stored entity repository.

Troubleshooting
---------------

[](#troubleshooting)

- Ensure configuration is set and the module is Enabled
- Run `bin/magento holidaydates:update` after changing API/locale config
- Check Magento system and exception logs for errors during updates
- Verify SelectCo Core module is installed and enabled

Credits &amp; Attribution
-------------------------

[](#credits--attribution)

This module relies on public holiday data provided by the Nager.Date project.

- © Nager.Date contributors
-

All holiday data remains the responsibility of the Nager.Date service and its data sources.

License
-------

[](#license)

This module is licensed under the Open Software License (OSL 3.0).

Use of holiday data obtained via the Nager.Date API is subject to the Nager.Date project’s license and terms.

Support
-------

[](#support)

If you have a feature request or spotted a bug or a technical problem, create a GitHub issue.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance60

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

344d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77499644?v=4)[adrianb11](/maintainers/adrianb11)[@adrianb11](https://github.com/adrianb11)

---

Top Contributors

[![adrianb11](https://avatars.githubusercontent.com/u/77499644?v=4)](https://github.com/adrianb11 "adrianb11 (10 commits)")

### Embed Badge

![Health badge](/badges/select-co-module-holiday-dates/health.svg)

```
[![Health](https://phpackages.com/badges/select-co-module-holiday-dates/health.svg)](https://phpackages.com/packages/select-co-module-holiday-dates)
```

###  Alternatives

[elgentos/regenerate-catalog-urls

Regenerate Catalog URL Rewrites (products, categories, cms pages)

2842.6M](/packages/elgentos-regenerate-catalog-urls)[nosto/module-nostotagging

Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.

27703.7k4](/packages/nosto-module-nostotagging)[tig/postnl-magento2

TIG Magento 2 PostNL extension

59570.5k5](/packages/tig-postnl-magento2)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

244.8k2](/packages/zwernemann-module-withdrawal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
