PHPackages                             pratiksh/nepalidate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pratiksh/nepalidate

ActiveLibrary

pratiksh/nepalidate
===================

Laravel package to convert AD to BS that can work with carbon.

v2.0.3(3mo ago)265.8k↓19%7[1 issues](https://github.com/pratiksh404/nepalidate/issues)1MITPHPPHP ^7.4|^8.0CI passing

Since Aug 5Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/pratiksh404/nepalidate)[ Packagist](https://packagist.org/packages/pratiksh/nepalidate)[ Docs](https://github.com/pratiksh/nepalidate)[ RSS](/packages/pratiksh-nepalidate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (16)Used By (1)

Laravel Nepali Date Converter
=============================

[](#laravel-nepali-date-converter)

[![Laravel Nepali Date Converter](https://github.com/pratiksh404/nepalidate/raw/main/screenshots/banner.png)](https://github.com/pratiksh404/nepalidate/blob/main/screenshots/banner.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4cf8a778039d19447aabdd12a5cdebc1ca73439ed08e8a5809176eb121610a39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726174696b73682f6e6570616c69646174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pratiksh/nepalidate)[![Stars](https://camo.githubusercontent.com/ec151485bd311b27ac798d0808dd84074d9f64ee3c21fbd920a0cfe37122ad26/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f70726174696b73683430342f6e6570616c6964617465)](https://github.com/pratiksh404/nepalidate/stargazers) [![Downloads](https://camo.githubusercontent.com/0fa73dbde5ccefaa21f68277ba2a4af100b33999f5f1f9086ed682fae0bbd2b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70726174696b73682f6e6570616c69646174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pratiksh/nepalidate) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/25625a5becdc7e6c282db437b2011b5c84ffa42da5bf3a3da00b142952d092b6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70726174696b73683430342f6e6570616c69646174652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/pratiksh404/nepalidate/?branch=main) [![CodeFactor](https://camo.githubusercontent.com/c1398a60abd9d3f37013787c3dc47675246f5213525e6673957bf8cc72e9d4e5/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f70726174696b73683430342f6e6570616c69646174652f6261646765)](https://www.codefactor.io/repository/github/pratiksh404/nepalidate)[![Larastan](https://github.com/pratiksh404/nepalidate/actions/workflows/larastan.yml/badge.svg)](https://github.com/pratiksh404/nepalidate/actions/workflows/larastan.yml/badge.svg)[![License](https://camo.githubusercontent.com/1e54dc8b584fd9b23b5394d9932a97e7661e9b7d9f61ae05e8421dd53518b715/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70726174696b73683430342f6e6570616c6964617465)](//packagist.org/packages/pratiksh/adminetic)

Laravel package to convert AD to BS that can work with carbon.

Installation
------------

[](#installation)

You can install the package via composer :

```
composer require pratiksh/nepalidate
```

Usages
------

[](#usages)

By Using Converter Classes.

### AD to BS

[](#ad-to-bs)

```
use Pratiksh\Nepalidate\Services\NepaliDate;

NepaliDate::create(\Carbon\Carbon::now())->toBS(); // 2082-02-04
NepaliDate::create(\Carbon\Carbon::now())->toFormattedEnglishBSDate(); // 4 Jestha 2082, Sunday
NepaliDate::create(\Carbon\Carbon::now())->toFormattedNepaliBSDate(); // ४ जेठ २०८२, आइतवार
```

By Using Helper Function.

```
toBS(\Carbon\Carbon::now()); // 2082-02-04
toFormattedEnglishBSDate(\Carbon\Carbon::now()); // 4 Jestha 2082, Sunday
toFormattedNepaliBSDate(\Carbon\Carbon::now()); // ४ जेठ २०८२, आइतवार
toDetailBS(\Carbon\Carbon::now()); // {
    "year": 2082,
    "month": "02",
    "day": "04",
    "dayOfWeek": 1,
  }
```

### BS to AD

[](#bs-to-ad)

```
use Pratiksh\Nepalidate\Services\EnglishDate;
EnglishDate::create("2082-02-04")->toAD(); //2025-05-18
EnglishDate::create("2082-02-04")->toAD('Y-m-d g:i A'); // 2025-05-18 12:00 AM
EnglishDate::create("2082-02-04")->toCarbon(); // To Carbon instance
EnglishDate::create("2082-02-04")->date; // Carbon instance
```

By Using Helper Functions

```
toAD("2082-02-04"); // Carbon instance
```

### Upgrade Guide

[](#upgrade-guide)

This new version include major updates that could break the code.

- `toFormattedBSDate(Carbon $date)` changed to `toFormattedEnglishBSDate(Carbon $date)`
- `toFormattedNepaliDate(Carbon $date)` changed to `toFormattedNepaliBSDate(Carbon $date)`
- Facades are removed.

### Testing

[](#testing)

```
./vendor/bin/pest
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Pratik Shrestha](https://github.com/pratiksh)
- [Krishna Bhandari](https://github.com/krishnahimself)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance80

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 82.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~137 days

Recently: every ~151 days

Total

13

Last Release

100d ago

Major Versions

v1.4.3 → v2.0.02025-05-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/001849cfcd496d28474179bde8e510e82ea2ff8b32291d2ac8fc905a754512e0?d=identicon)[pratiksh404](/maintainers/pratiksh404)

---

Top Contributors

[![pratiksh404](https://avatars.githubusercontent.com/u/40533219?v=4)](https://github.com/pratiksh404 "pratiksh404 (48 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (7 commits)")[![nisanchamling](https://avatars.githubusercontent.com/u/172175904?v=4)](https://github.com/nisanchamling "nisanchamling (2 commits)")[![imanilchaudhari](https://avatars.githubusercontent.com/u/6130886?v=4)](https://github.com/imanilchaudhari "imanilchaudhari (1 commits)")

---

Tags

ad-to-bs-phplaravel-ad-to-bslaravel-nepali-date-converterlaravel-packagenepali-date-converterpratikshnepalidate

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/pratiksh-nepalidate/health.svg)

```
[![Health](https://phpackages.com/badges/pratiksh-nepalidate/health.svg)](https://phpackages.com/packages/pratiksh-nepalidate)
```

###  Alternatives

[pratiksh/adminetic

Admin Panel Starter Kit

451.6k1](/packages/pratiksh-adminetic)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
