s1k3/bangla-date
#####Laravel Library for converting English Date to Bangla
For Installation follow the following steps:
- composer require s1k3/bangla-date
- (You may skip this step when using Laravel >= 5.5)). Navigate to the path/to/config/app.php and add to the providers array
'providers' => [
S1K3\Bangla\Date\BanglaDateServiceProvider::class
]
- Execute the following command from the command-line to publish the package's config and the default template to start generating awesome code.
php artisan vendor:publish --provider="S1K3\Bangla\Date\BanglaDateServiceProvider"
Basic Usage:
bangla_date(time()) // OUTPUT ১২ চৈত্র ১৪২৫
bangla_date(time(),"en") // OUTPUT ২৬ মার্চ ২০১৯
bangla_date(time(),"bn") // OUTPUT ১২ চৈত্র ১৪২৫
bangla_date(time(),"bn","d-m-y") // OUTPUT ১২-চৈত্র-১৪২৫
Configuration:
return [
'hour' => 6,
'language' => 'bn',
'format' => 'd m, y'
];
| property | Description |
|---|---|
| format | Date formatting. |
| language | 'en' for english format. 'bn' for bangla format |
| hour | If 0, then date will change instantly. If it's 6, date will change at 6'0 clock at the morning. Default is 6'0 clock at the morning |
Supported values for format.
| property | Description |
|---|---|
| m | Month |
| d | Day |
| y | Year |
Related Packages
erirk/paypalpayment
laravel-paypalpayment is simple package help you process direct credit card paym...
0
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
631,580,251
9,707