hpez / persian-cal-event
Persian (Jalali) calendar events package
Installs: 1 173
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 1
Open Issues: 0
Type:project
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- nesbot/carbon: ^2.21
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2024-10-29 05:52:57 UTC
README
This package aims to provide events for Persian calendar (jalali) crawling time.ir and using morilog/jalali for conversion.
Features
- Indicates holidays
- Events in that day
- Supports both jalali and gregorian
- Indicates if an event is due to religious reasons
Installation
composer require hpez/persian-cal-event
Usage
PersianCalEvent::jalali(1398, 1, 1);
/*
{
"is_holiday": true,
"events": [
{
"description": "جشن نوروز/جشن سال نو",
"additional_description": "",
"is_religious": false
}
]
}
*/
PersianCalEvent::gregorian(2019, 8, 12);
PersianCalEvent::gregorian(new Carbon('2019-08-12'));
/*
{
"is_holiday": true,
"events": [
{
"description": "عید سعید قربان",
"additional_description": "١٠ ذوالحجه",
"is_religious": true
}
]
}
*/