janknapik/laravel-slovak-namedays

A Laravel package to get Slovak namedays.

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/janknapik/laravel-slovak-namedays

1.0 2024-11-12 07:54 UTC

This package is auto-updated.

Last update: 2025-12-12 11:06:07 UTC


README

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.

Features

  • Retrieve namedays for any date in the Slovak calendar.
  • Includes support for leap years.
  • Easy integration into any Laravel project.

Installation

  1. Install via Composer:

    Run the following command in your terminal to install the package:

    composer require janknapik/laravel-slovak-namedays
  2. 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
  3. 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

Usage

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.

Example

use Janknapik\SlovakNamedays\SlovakNamedays;

$slovakNamedays = new SlovakNamedays();
$currentDate = Carbon::now();
$namedays = $slovakNamedays->getSlovakNamedays($currentDate);

echo "The nameday for is: $namedays";

Configuration

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.

License

This package is open-source software, licensed under the MIT License.

Contributing

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!