Download the PHP package ashbink/nepali-miti without Composer
On this page you can find all versions of the php package ashbink/nepali-miti. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ashbink/nepali-miti
More information about ashbink/nepali-miti
Files in ashbink/nepali-miti
Package nepali-miti
Short Description A standalone PHP package for converting BS to AD and vice versa.
License
Informations about the package nepali-miti
Nepali Date Converter (PHP)
A blazing fast, lightweight, and framework-agnostic PHP package to convert Nepali Date (Bikram Sambat - BS) to English Date (Anno Domini - AD) and vice versa.
Works perfectly with pure Core PHP, Laravel, CodeIgniter, Symfony, and WordPress!
๐ Features
- Framework-Agnostic: No framework dependencies. Works anywhere PHP runs.
- Lightning Fast: Zero database queries. Everything runs in-memory.
- Multiple Date Formats: Seamlessly parse and format dates in multiple standard formats.
- Textual Dates: Support for translating dates into text (e.g.,
2082 เคเคพเคฐเฅเคคเคฟเค 25or2026 August 20). - Zero Setup: No configuration required.
- 100% Accurate BS to AD conversion.
- 100% Accurate AD to BS conversion.
๐ Supported Date Formats
The package supports 6 common date formats for both Input and Output. By default, the package assumes and returns the YYYY-MM-DD format.
Y-m-dโ YYYY-MM-DD (Default)Y/m/dโ YYYY/MM/DDd/m/Yโ DD/MM/YYYYd-m-Yโ DD-MM-YYYYm/d/Yโ MM/DD/YYYYm-d-Yโ MM-DD-YYYY
๐ฆ Installation
You can install the package via composer into any PHP framework or project:
๐ ๏ธ Usage
This package is designed for maximum Developer Experience (DX).
You can use it in two ways:
- 1: Global Helper Functions โ Best for Blade & Quick Logic
- 2: NepDate Class โ Best for Controllers & Services
BS to AD (Nepali to English)
Output:
AD to BS (English to Nepali)
Output:
BS to AD (Custom Input Format)
Output:
AD to BS (Custom Input & Output Formats)
Output:
Textual Date Conversion with Custom Layouts
You can use standard PHP date formats (Y, F, j, d, m) to format textual output.
Output:
Output:
Output:
In the Classes or Services
If you prefer class-based static calls, you can use the NepDate class.
Example
๐ License
The MIT License (MIT). Please see the License file for more information.