BBnepal-Accounts/vendor/ernilambar/nepali-date
2024-09-29 16:59:27 +05:45
..
src changes for filter and print 2024-09-29 16:59:27 +05:45
composer.json changes for filter and print 2024-09-29 16:59:27 +05:45
composer.lock changes for filter and print 2024-09-29 16:59:27 +05:45
phpcs.tests.xml.dist changes for filter and print 2024-09-29 16:59:27 +05:45
README.md commitall 2024-07-10 18:28:19 +05:45

Nepali Date

Nepali Date Converter and utilities.

Requirements

  • PHP 5.6+.
  • Composer for managing PHP dependencies.

Installation

Use Composer to install the package.

composer require ernilambar/nepali-date

Use this to include autoload file.

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

This project is licensed under the MIT.

2021 © Nilambar Sharma.