proshore/nepali-date-converter
最新稳定版本:1.0.0
Composer 安装命令:
composer require proshore/nepali-date-converter
包简介
Package to convert carbon date to nepali date
README 文档
README
This Laravel package provides functionality to convert dates from the Gregorian calendar (AD) to the Bikram Sambat calendar (BS) using the native Carbon library. It's especially useful for applications targeting Nepali users or systems where Bikram Sambat dates are relevant.
Features
- Seamless conversion of dates from AD to BS and vice versa.
- Integration with Laravel's native Carbon library for efficient and accurate date manipulation.
- Simple to integrate into existing Laravel applications.
Requirements
- PHP >= 8.0
- Carbon PHP Library
Installation
Composer
Install using composer
composer require proshore/laravel-nepali-date-converter
Publish your config file
php artisan vendor:publish --tag=nepali-date
Usages
You can directly convert Carbon date to Nepali date using chain function in Carbon.
Carbon\Carbon::now()->toBS();
Get Formatted date
Carbon\Carbon::now()->toBSDate();
Carbon\Carbon::now()->toBSFormattedDate();
Using without carbon
Proshore\NepaliDate\Facades\NepaliDateConverter::getBSbyAd(2024,03,01);
Proshore\NepaliDate\Facades\NepaliDateConverter::getADbyBS(2080,11,18);
Get Carbon date from Bs Date
Proshore\NepaliDate\Facades\NepaliDateConverter::toAD(2080,11,18);
Contributers ✨
统计信息
- 总下载量: 422
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-05




