PHPackages                             asorasoft/chhankitek - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. asorasoft/chhankitek

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

asorasoft/chhankitek
====================

Convert from AD (Anno Domini) to Lunar (Chhankitek) format.

2.0.3(3mo ago)104.2k↓16.7%8MITPHPPHP ^8.2

Since Jun 29Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/HELMAB/chhankitek)[ Packagist](https://packagist.org/packages/asorasoft/chhankitek)[ Docs](https://github.com/HELMAB/chhankitek)[ RSS](/packages/asorasoft-chhankitek/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (20)Used By (0)

Chhankitek for Laravel
======================

[](#chhankitek-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ffe2da89b3459dda9524863a76217c8385c2ca9a1a4f980b4a15cb8999d76bb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61736f7261736f66742f636868616e6b6974656b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/asorasoft/chhankitek)[![Total Downloads](https://camo.githubusercontent.com/cb5e903c4c922b7a39f5d5343515d1202c03744ecea5a9d96d0d186a5e3da2aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61736f7261736f66742f636868616e6b6974656b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/asorasoft/chhankitek)

A Laravel package to convert dates to Lunar (Chhankitek) format. [Learn more about Khmer calendar](https://khmer-calendar.tovnah.com/calendar).

---

🇰🇭 Stand with Cambodia • កម្ពុជា
--------------------------------

[](#-stand-with-cambodia--កម្ពុជា)

### 🕊️ **Cambodia Needs Peace** 🕊️

[](#️-cambodia-needs-peace-️)

We stand in solidarity with our brave soldiers defending Cambodia's sovereignty and territorial integrity. Our hearts are with those protecting our homeland during these challenging times. We call upon the international community to support peaceful resolution and respect for Cambodia's borders.

**🙏 កម្ពុជាត្រូវការសន្តិភាព • Together we stand for peace and sovereignty**

---

Documentation
-------------

[](#documentation)

For detailed documentation, please visit

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

[](#installation)

You can install the package via composer:

```
composer require asorasoft/chhankitek
```

Usage
-----

[](#usage)

```
// In your Laravel controller, use this trait
use HasChhankitek;

// Convert a date to lunar format
$toLunarDate = $this->chhankitek(Carbon\CarbonImmutable::now()->setTimezone('Asia/Phnom_Penh'));
$toLunarDate->toString(); // ថ្ងៃច័ន្ទ ៤ រោច ខែបឋមាសាឍ ឆ្នាំឆ្លូវ ត្រីស័ក ពុទ្ធសករាជ ២៥៦៥
```

Available Methods
-----------------

[](#available-methods)

```
// In your Laravel controller, use this trait
use HasChhankitek;

$toLunarDate = $this->chhankitek(Carbon\CarbonImmutable::now()->setTimezone('Asia/Phnom_Penh'));

// Get specific lunar date components
$toLunarDate->getDayOfWeek(); // អាទិត្យ, ច័ន្ទ...
$toLunarDate->getLunarDay(); // ១កើត, ២កើត...
$toLunarDate->getLunarMonth(); // ចេត្រ...
$toLunarDate->getLunarZodiac(); // ជូត, ឆ្លូវ...
$toLunarDate->getLunarEra(); // ត្រីស័ក...
$toLunarDate->getLunarYear(); // ២៥៦៥, ២៥៦៦..
```

Alternatively, you can use the `toLunarDate` helper function:

```
toLunarDate(Carbon\CarbonImmutable::now()->setTimezone('Asia/Phnom_Penh')); // ថ្ងៃច័ន្ទ ៤ រោច ខែបឋមាសាឍ ឆ្នាំឆ្លូវ ត្រីស័ក ពុទ្ធសករាជ ២៥៦៥
```

Caching
-------

[](#caching)

The Chhankitek package implements caching to improve performance when converting dates to lunar format. When you convert a date using the package, the result is cached for one year (365 days) to minimize computational overhead for frequently accessed dates.

### How caching works

[](#how-caching-works)

- Each converted date is cached
- Cache duration: 365 days (60 \* 60 \* 24 \* 365 seconds)
- The package leverages Laravel's cache system, so it will use whatever cache driver you've configured for your application

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes.

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.

Support
-------

[](#support)

If you like this package and want to support me, you can [buy me a coffee ☕](https://www.buymeacoffee.com/helmab)

Credits
-------

[](#credits)

- [Mab Hel](https://github.com/asorasoft)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Authors and Acknowledgment
--------------------------

[](#authors-and-acknowledgment)

This library would not exist without the hard work of these people:

1. Based on the algorithm by `Mr. Phylypo Tum` from [Khmer Calendar](https://khmer-calendar.tovnah.com/calendar/chhankitek.php)
2. Ported from [momentkh](https://github.com/ThyrithSor/momentkh) by `ThyrithSor` into `Java`
3. [Khmer New Year Time Calculation](http://www.dahlina.com/education/khmer_new_year_time.html)
4. Ported from [MetheaX/khmer-chhankitek-calendar](https://github.com/MetheaX/khmer-chhankitek-calendar) by `MetheaX` into a `Laravel Package`

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance87

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 63.5% 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 ~152 days

Recently: every ~66 days

Total

12

Last Release

96d ago

Major Versions

1.0.10 → 2.0.02025-06-07

PHP version history (4 changes)1.0.3PHP ^7.2|^7.4|^8.0

1.0.5PHP ^7.2|^7.4|^8.0|^8.1

1.0.6PHP &gt;=7.2

2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/471677a5a12c3838ee579ecfa5352c1def8b95314651338edd4bd62147a2394c?d=identicon)[HEL Mab](/maintainers/HEL%20Mab)

---

Top Contributors

[![HELMAB](https://avatars.githubusercontent.com/u/15307857?v=4)](https://github.com/HELMAB "HELMAB (66 commits)")[![helmabio](https://avatars.githubusercontent.com/u/116546528?v=4)](https://github.com/helmabio "helmabio (27 commits)")[![putheakhem](https://avatars.githubusercontent.com/u/8064772?v=4)](https://github.com/putheakhem "putheakhem (7 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (4 commits)")

---

Tags

chankitichhankitekkhmerkhmer-calendarkhmer-chhankitek-calendarkhmerdatekhmerlunarlaravellunarasorasoftchhankitek

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/asorasoft-chhankitek/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M858](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[illuminate/cookie

The Illuminate Cookie package.

224.3M120](/packages/illuminate-cookie)

PHPackages © 2026

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