Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hpez/persian-cal-events
A PHP library for persian (jalali) calendar events.
https://github.com/hpez/persian-cal-events
calendar holiday-calculation holidays jalali jalali-calendar php
Last synced: 28 days ago
JSON representation
A PHP library for persian (jalali) calendar events.
- Host: GitHub
- URL: https://github.com/hpez/persian-cal-events
- Owner: hpez
- License: mit
- Created: 2019-07-29T15:03:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-02T16:57:09.000Z (over 5 years ago)
- Last Synced: 2024-04-21T15:01:30.671Z (8 months ago)
- Topics: calendar, holiday-calculation, holidays, jalali, jalali-calendar, php
- Language: PHP
- Size: 63.5 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Persian Calendar Events [![codecov](https://codecov.io/gh/hpez/persian-cal-events/branch/master/graph/badge.svg)](https://codecov.io/gh/hpez/persian-cal-events) [![Build Status](https://travis-ci.org/hpez/persian-cal-events.svg?branch=master)](https://travis-ci.org/hpez/persian-cal-events)
This package aims to provide events for Persian calendar (jalali) crawling time.ir and using [morilog/jalali](https://github.com/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
}
]
}
*/