A Laravel package to get Slovak namedays.
janknapik/laravel-slovak-namedays is a Laravel package for a laravel package to get slovak namedays..
It currently has 1 GitHub stars and 5 downloads on Packagist (latest version 1.0).
Install it with composer require janknapik/laravel-slovak-namedays.
Discover more Laravel packages by janknapik
or browse all Laravel packages to compare alternatives.
Last updated
This package provides a simple and convenient way to retrieve Slovak namedays based on date. The data is sourced from a JSON file and supports the full Slovak calendar year, including adjustments for leap years.
Install via Composer:
Run the following command in your terminal to install the package:
composer require janknapik/laravel-slovak-namedays
Publish the Configuration (optional):
After installation, if you want to customize the package configuration, you can publish the configuration file:
php artisan vendor:publish --tag=slovak-namedays-config
Namedays Data File:
The JSON file containing the nameday data will be stored in the data/namedays.json directory. You can customize the data if needed by editing this file.
php artisan vendor:publish --tag=slovak-namedays-config
To use the package, you can call the getSlovakNamedays($date) function to retrieve the nameday for a specific date. The date should be provided in MM-DD format, such as "01-01" for January 1st.
use Janknapik\SlovakNamedays\SlovakNamedays;
$slovakNamedays = new SlovakNamedays();
$currentDate = Carbon::now();
$namedays = $slovakNamedays->getSlovakNamedays($currentDate);
echo "The nameday for is: $namedays";
The namedays.json file in the data directory contains the nameday data for every day of the year. The format for each entry is "MM-DD": "Name". You can edit this file if you need to add custom namedays or modify existing entries.
This package is open-source software, licensed under the MIT License.
We welcome contributions from the community! If you'd like to suggest a feature, report a bug, or contribute code, please follow these steps:
Fork the repository. Create a new branch for your feature or bugfix. Make your changes and test them thoroughly. Submit a pull request with a detailed description of your changes. This package was developed and maintained by janknapik. If you have any questions or issues, please feel free to reach out or open an issue on GitHub.
Thank you for using the Slovak Namedays Laravel Package!