1. Go to this page and download the library: Download ernilambar/nepali-date 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/ */
ernilambar / nepali-date example snippets
use Nilambar\NepaliDate\NepaliDate;
$obj = new NepaliDate();
// Convert BS to AD.
$date = $obj->convertBsToAd(2077, 1, 1);
// Convert AD to BS.
$date = $obj->convertAdToBs(2020, 1, 1);
// Date details for a BS date (language: 'en' or 'np' for Devanagari numerals / labels).
$date = $obj->getDetails(2077, 1, 1, 'bs', 'en');
$date = $obj->getDetails(2077, 1, 1, 'bs', 'np');
// Date details for an AD date (converted internally, then formatted like BS).
$date = $obj->getDetails(2020, 1, 1, 'ad', 'en');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.