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. select-co/module-holiday-dates

ActiveMagento2-module

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

N/A

1.0.3(9mo ago)0101ProprietaryPHP

Since Jul 23Pushed 5mo 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 1mo ago

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

31

—

LowBetter than 68% of packages

Maintenance65

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

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

299d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb8edf7bc18e5fb40dfff088ad0b26b0dbb4828d29ebee10131b9be858d4e5fb?d=identicon)[adrianb11](/maintainers/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

[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.2M1](/packages/fastly-magento2)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)[zepgram/module-rest

Technical module to industrialize API REST call with dependency injection pattern using Guzzle library

1326.2k](/packages/zepgram-module-rest)[graycore/magento2-graphql-introspection-cache

1015.2k](/packages/graycore-magento2-graphql-introspection-cache)[mage-os/mageos-common-async-events

Send REST requests to external endpoints asynchronously. This module implements the most common events like order creation and customer change.

147.7k2](/packages/mage-os-mageos-common-async-events)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

126.8k](/packages/mage-os-module-inventory-reservations-grid)

PHPackages © 2026

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