Download the PHP package ernilambar/nepali-date without Composer
On this page you can find all versions of the php package ernilambar/nepali-date. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ernilambar/nepali-date
More information about ernilambar/nepali-date
Files in ernilambar/nepali-date
Package nepali-date
Short Description Nepali (Bikram Sambat) calendar utilities and BS ↔ AD date conversion for PHP.
License MIT
Homepage https://github.com/ernilambar/nepali-date
Informations about the package nepali-date
Nepali Date
Nepali (Bikram Sambat) calendar utilities and BS ↔ AD (Gregorian) date conversion for PHP. This package converts between BS and AD dates and exposes helpers for formatted labels (English or Nepali script).
Requirements
- PHP 5.6+.
- Composer for managing PHP dependencies.
Installation
Install the package with Composer (see Packagist):
Autoloading
Require Composer’s autoload once from your project root (where vendor/ lives).
Usage
Examples use integers for year, month, and day. The API also accepts numeric strings (e.g. '2077') where values are used numerically.
getDetails( $year, $month, $day, $type, $language ): $type is 'bs' or 'ad'; $language is optional and defaults to 'en'.
Supported ranges
Conversions rely on a fixed embedded calendar table. In practice:
- Gregorian (AD): years 1944–2033 are considered by the range checks; only dates that exist in the table can be converted (the first supported pair is 1944-01-01 ↔ BS 2000-09-17, and the last supported AD day in the current data is 2033-04-13 ↔ BS 2089-12-30).
- Bikram Sambat (BS): years 2000–2089 are in range; individual month/day combinations must still exist in the table (invalid or out-of-range inputs typically yield an empty array from conversion methods).
Copyright and License
This project is licensed under the MIT.
2026 © Nilambar Sharma.