holiday-morroco / holiday-package
A PHP package to check Moroccan holidays
dev-main
2024-04-17 14:43 UTC
Requires
- php: >=7.1
Provides
- vendor/package: ^2.0
This package is auto-updated.
Last update: 2025-03-17 17:04:37 UTC
README
This PHP package provides functionality to check if a given date is a holiday in Morocco.
Installation
You can install this package via Composer. Run the following command in your terminal:
composer require vendor/moroccan-holidays
#Usage
To check if today is a holiday, you can use the HolidayChecker class provided by this package. Here's an example:
require 'vendor/autoload.php'; use Vendor\MoroccanHolidays\HolidayChecker; // Check if today is a holiday $result = HolidayChecker::isTodayHoliday(); if ($result['status']) { echo "Today is a holiday in Morocco: " . $result['name']; } else { echo "Today is not a holiday in Morocco."; }