PHP code example of shankhadev / bsdate

1. Go to this page and download the library: Download shankhadev/bsdate library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

shankhadev / bsdate example snippets


Shankhadev\Bsdate\BsdateServiceProvider::class,

'Bsdate' => Shankhadev\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] => ७
)