devroshan / bsdate
一个简单的包,可以将公历(AD)转换为巴利历(BS),反之亦然。
1.2
2018-11-21 09:32 UTC
Requires
- php: >=5.5.9
This package is auto-updated.
Last update: 2024-09-21 23:04:06 UTC
README
一个Laravel日期包,可以将公历(AD)转换为巴利历(BS),反之亦然。
#安装
- 要安装Laravel 5的Laravelbsdate,请前往您的项目文件夹,打开终端,并运行以下代码
composer require devroshan/bsdate
- 打开您的
config/app.php文件,并将以下内容添加到providers数组中
devroshan\Bsdate\BsdateServiceProvider::class,
- 在相同的
config/app.php文件中,将以下内容添加到aliases数组中
'Bsdate' => devroshan\Bsdate\BsdateFacade::class,
用法
Bsdate::eng_to_nep(2016,12,31); //For converting AD TO BS Bsdate::nep_to_eng(2073,09,16); //For converting BS TO AD // output Array ( [year] => २०७३ [month] => ९ [date] => १६ [day] => शनिबार [nmonth] => पुष [num_day] => ७ )