p-potsikas/laravel-hellenic-holidays

Laravel package for Greek public holidays, observances and fixed namedays.

Maintainers

Package info

github.com/p-potsikas/laravel-hellenic-holidays

pkg:composer/p-potsikas/laravel-hellenic-holidays

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-06-20 17:14 UTC

This package is auto-updated.

Last update: 2026-06-20 17:14:43 UTC


README

██╗  ██╗███████╗██╗     ██╗     ███████╗███╗   ██╗██╗ ██████╗
██║  ██║██╔════╝██║     ██║     ██╔════╝████╗  ██║██║██╔════╝
███████║█████╗  ██║     ██║     █████╗  ██╔██╗ ██║██║██║
██╔══██║██╔══╝  ██║     ██║     ██╔══╝  ██║╚██╗██║██║██║
██║  ██║███████╗███████╗███████╗███████╗██║ ╚████║██║╚██████╗
╚═╝  ╚═╝╚══════╝╚══════╝╚══════╝╚══════╝╚═╝  ╚═══╝╚═╝ ╚═════╝

██╗  ██╗ ██████╗ ██╗     ██╗██████╗  █████╗ ██╗   ██╗███████╗
██║  ██║██╔═══██╗██║     ██║██╔══██╗██╔══██╗╚██╗ ██╔╝██╔════╝
███████║██║   ██║██║     ██║██║  ██║███████║ ╚████╔╝ ███████╗
██╔══██║██║   ██║██║     ██║██║  ██║██╔══██║  ╚██╔╝  ╚════██║
██║  ██║╚██████╔╝███████╗██║██████╔╝██║  ██║   ██║   ███████║
╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚══════╝

Wake up, Laravel... The Greek holidays have been calculated. Follow the Orthodox Easter offset.

Laravel package for Greek public holidays and observances, implemented in pure PHP.

The package supports Laravel 10, 11 and 12, and provides a service, facade and helper for common holiday, working-day and fixed nameday checks.

Installation

Install from Packagist:

composer require p-potsikas/laravel-hellenic-holidays

If the package has not been published to Packagist yet, install directly from GitHub:

composer config repositories.laravel-hellenic-holidays vcs https://github.com/p-potsikas/laravel-hellenic-holidays
composer require p-potsikas/laravel-hellenic-holidays:dev-main

Publish the configuration file:

php artisan vendor:publish --tag=hellenic-holidays-config

Laravel auto-discovery registers the service provider automatically.

Usage

use HellenicHolidays;

$holidays = HellenicHolidays::getHolidays(2026);
$result = HellenicHolidays::isHoliday('2026-12-25');
$next = HellenicHolidays::getNextHoliday();
$isWorkingDay = HellenicHolidays::isWorkingDay('2026-06-19');
$namedays = HellenicHolidays::getNamedaysForDate('2026-01-17');
$isNameday = HellenicHolidays::isNameday('Αντώνης', '2026-01-17');

You can also import the facade class directly:

use Potsikas\LaravelHellenicHolidays\Facades\HellenicHolidays;

Helper:

$holidays = hellenic_holidays()->getHolidays(2026);

The facade exposes:

HellenicHolidays::getHolidays(2026);
HellenicHolidays::isHoliday('2026-12-25');
HellenicHolidays::getNextHoliday('2026-12-24');
HellenicHolidays::getHolidaysByType(2026, 'national');
HellenicHolidays::isWorkingDay('2026-06-19');
HellenicHolidays::orthodoxEaster(2026);
HellenicHolidays::getNamedays(2026);
HellenicHolidays::getNamedaysForDate('2026-01-17');
HellenicHolidays::getNamedaysForName('Αντώνης', 2026);
HellenicHolidays::isNameday('Αντώνης', '2026-01-17');

Controller Example

<?php

namespace App\Http\Controllers;

use Potsikas\LaravelHellenicHolidays\Facades\HellenicHolidays;

final class HolidayController
{
    public function index(int $year): array
    {
        return array_map(
            fn ($holiday) => $holiday->toArray(),
            HellenicHolidays::getHolidays($year)
        );
    }

    public function check(string $date): array
    {
        return HellenicHolidays::isHoliday($date)->toArray();
    }
}

Included Holidays

Fixed holidays:

  • 01-01 Πρωτοχρονιά / New Year's Day
  • 06-01 Θεοφάνεια / Epiphany
  • 25-03 Ευαγγελισμός της Θεοτόκου - Εθνική Εορτή / Greek Independence Day
  • 01-05 Εργατική Πρωτομαγιά / Labour Day
  • 15-08 Κοίμηση της Θεοτόκου / Dormition of the Mother of God
  • 28-10 Επέτειος του Όχι / Ohi Day
  • 25-12 Χριστούγεννα / Christmas Day
  • 26-12 Σύναξη της Θεοτόκου / Synaxis of the Mother of God

Movable holidays based on Orthodox Easter:

  • Καθαρά Δευτέρα, Easter -48
  • Μεγάλη Παρασκευή, Easter -2
  • Μεγάλο Σάββατο, Easter -1
  • Κυριακή του Πάσχα, Easter
  • Δευτέρα του Πάσχα, Easter +1
  • Αγίου Πνεύματος, Easter +50

Αγίου Πνεύματος is included as an optional holiday. Enable optional holidays with include_optional_holidays.

Configuration

return [
    'locale' => 'el',
    'include_saturdays_as_non_working_day' => true,
    'include_sundays_as_non_working_day' => true,
    'include_optional_holidays' => false,
    'include_namedays' => true,
    'custom_holidays' => [
        '2026-12-31' => [
            'name_el' => 'Ειδική Αργία',
            'name_en' => 'Special Holiday',
            'type' => 'custom',
            'is_public_holiday' => true,
        ],
    ],
    'custom_namedays' => [
        '2026-12-31' => [
            'names' => ['Δοκιμή'],
        ],
    ],
    'overridden_holidays' => [],
    'moved_holidays' => [
        'labour_day' => [
            2026 => '2026-05-04',
        ],
    ],
];

For payroll, legal or HR use, verify exceptional transferred holidays and year-specific ministerial decisions before relying on generated results.

Data Objects

Holiday contains:

  • date: Carbon\CarbonImmutable
  • nameEl: Greek name
  • nameEn: English name
  • type: HolidayType
  • isPublicHoliday: public holiday flag
  • key: stable identifier

HolidayResult contains:

  • isHoliday: boolean
  • holiday: Holiday|null

Nameday contains:

  • date: Carbon\CarbonImmutable
  • names: list of Greek names
  • key: stable identifier
  • status: fixed

All data objects include toArray() methods.

Nameday Data

Bundled namedays are fixed Greek namedays only. Moving namedays are excluded until they are supported by explicit package rules.

The fixed nameday dataset is derived from alexstyl/Greek-namedays, released under the Unlicense.

Attribution

This package is an original PHP/Laravel implementation. The idea and public API shape are inspired by the MIT-licensed eliac7/hellenic-holidays JavaScript package.

No JavaScript source code from that project is included.

The bundled fixed nameday data is derived from the Unlicense alexstyl/Greek-namedays dataset.

License

The MIT License (MIT). See LICENSE.