omalizadeh/laravel-jalali-calendar
最新稳定版本:v1.0.1
Composer 安装命令:
composer require omalizadeh/laravel-jalali-calendar
包简介
A laravel package to get jalali events from time.ir
README 文档
README
Laravel Jalali Calendar
This is a laravel package to get jalali date events and holidays by parsing time.ir website.
⭐ Star! if you used & liked this package.
Installation
Install package with composer:
composer require omalizadeh/laravel-jalali-calendar
Usage
Get a JalaliDate object by calling fromGregorian static method on JalaliCalendar class. example:
use Omalizadeh\JalaliCalendar\JalaliCalendar; $jalaliDate = JalaliCalendar::fromGregorian('2020-05-24');
Or you can get a collection of JalaliDate objects by giving a gregorian period.
use Omalizadeh\JalaliCalendar\JalaliCalendar; $jalaliDates = JalaliCalendar::fromGregorianPeriod('2020-05-24', '2020-05-28');
Then you can get different info from JalaliDate object. supported methods:
| Methods | Return type | Description |
|---|---|---|
| format() | string | Jalali date with given format |
| isHoliday() | bool | Check jalali date is holiday |
| events() | array | Get date's events |
License
- Laravel Jalali Calendar is open-sourced software licensed under the MIT license.
- This package is created based on Persiancalapi project.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-26