Nepali Date: PHP Composer Package for Nepali Date Converter and Utilities

Nepali Date is a PHP composer package for Nepali to English Date converter. In Nepal, Bikram Sambat (BS) date is used and we frequently need to convert BS date to AD date. This package provides helper class and methods for the purpose. Instructions for installation and usages examples are given below.

Github Link: Github


Use Composer to install the package. If you have not setup Composer in your machine, please visit Get Composer first.

composer require ernilambar/nepali-date

Use following to include autoload file in your project.

require_once __DIR__ . '/vendor/autoload.php';


Usage examples:

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');

// Get Nepali date details by BS date.
$date = $obj->getDetails('2077', '1', '1', 'bs');

// Get Nepali date details by AD date.
$date = $obj->getDetails('2020', '1', '1', 'ad');

If you have any queries or feedback or if you find bug, please feel free to create issue in the GitHub repo.

8 thoughts on “Nepali Date: PHP Composer Package for Nepali Date Converter and Utilities

  1. I’ve always found working with Nepali dates a bit tricky, so this Composer package is a welcome solution. The ability to seamlessly convert and manipulate Nepali dates within PHP applications is going to save a lot of time and effort. Kudos to the developers for creating this handy utility!

Leave a Reply

Your email address will not be published. Required fields are marked *