Download the PHP package p-potsikas/laravel-hellenic-holidays without Composer
On this page you can find all versions of the php package p-potsikas/laravel-hellenic-holidays. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download p-potsikas/laravel-hellenic-holidays
More information about p-potsikas/laravel-hellenic-holidays
Files in p-potsikas/laravel-hellenic-holidays
Package laravel-hellenic-holidays
Short Description Laravel package for Greek public holidays, observances and fixed namedays.
License MIT
Informations about the package laravel-hellenic-holidays
Laravel Hellenic Holidays
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 nameday checks.
Installation
Install from Packagist:
If the package has not been published to Packagist yet, install directly from GitHub:
Publish the configuration file:
Laravel auto-discovery registers the service provider automatically.
Usage
You can also import the facade class directly:
Helper:
The facade exposes:
Controller Example
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
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\CarbonImmutablenameEl: Greek namenameEn: English nametype:HolidayTypeisPublicHoliday: public holiday flagkey: stable identifier
HolidayResult contains:
isHoliday: booleanholiday:Holiday|null
Nameday contains:
date:Carbon\CarbonImmutablenames: list of Greek nameskey: stable identifierstatus:fixed,movingor custom valuetitle: celebration title, when availableeasterOffset: integer offset from Orthodox Easter for moving namedays
All data objects include toArray() methods.
Nameday Data
Bundled namedays include fixed Greek namedays and moving namedays calculated from Orthodox Easter offsets.
The nameday datasets are 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 nameday data is derived from the Unlicense alexstyl/Greek-namedays dataset.
License
The MIT License (MIT). See LICENSE.
All versions of laravel-hellenic-holidays with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
nesbot/carbon Version ^2.72|^3.0