PHPackages                             khanhkid/lunar-date-convertor - 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. khanhkid/lunar-date-convertor

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

khanhkid/lunar-date-convertor
=============================

Convert English Date to Lunar Date and revert

v1.0.2(4y ago)0391Apache-2.0PHPPHP &gt;=5.6.0

Since Sep 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/khanhkid/lunar-date-convertor)[ Packagist](https://packagist.org/packages/khanhkid/lunar-date-convertor)[ Docs](https://github.com/khanhkid/lunar-date-convertor)[ RSS](/packages/khanhkid-lunar-date-convertor/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Convert English Date to Lunar Date
----------------------------------

[](#convert-english-date-to-lunar-date)

I forked from After that Make it easier for use. Add some Class for more detail Zodiac (Vietnamese).

```
composer require khanhkid/lunar-date-convertor

```

How to use:

```
$date = new \Khanhkid\DateConvertor\DateProcess('1967-04-14');
echo "Lunar Date:". $date->getLunarDate();
echo "English Date:". $date->getEnglishDate();

```

Result:

```
object(Khanhkid\EnglishDate)#1 (3) {
  ["EDay"]=>
  string(2) "08"
  ["EMonth"]=>
  string(2) "09"
  ["EYear"]=>
  string(4) "2021"
}
string(10) "2021-08-02"
object(Khanhkid\EnglishDate)#3 (3) {
  ["EDay"]=>
  int(8)
  ["EMonth"]=>
  int(9)
  ["EYear"]=>
  int(2021)
}
string(10) "2021-08-02"

```

Vietnamese more detail for English Date
---------------------------------------

[](#vietnamese-more-detail-for-english-date)

How to use:

```
$result = \Khanhkid\DateConvertor\DateToLunarDate::getArrayDateInfo(date('d'), date('m'), date('Y'));
echo ''.print_r($d).'';

```

Result on Vietnamese:

```
Array
(
    [input_date] => 2021-09-07
    [output_lunar] => 2021-08-01
    [weekday] => Tuesday
    [weekday_vi] => Thứ 3
    [month_lunar] => Tháng Tám
    [month_lunar_leap] => Không
    [month_lunar_full] => Đủ
    [year_leap] => Năm dương không nhuận
    [year_lunar_leap] => Năm âm không nhuận
    [can_chi_nam] => Năm Tân Sửu
    [can_chi_thang] => Tháng Đinh Dậu
    [can_chi_ngay] => Ngày Mậu Ngọ
    [can_chi_gio] => Giờ Nhâm Tý
    [tiet_khi] => Bạch lộ
    [day_info] => Ngày thường
    [hoang_dao] => Tý (23-1), Sửu (1-3), Mão (5-7), Ngọ (11-13), Thân (15-17), Dậu (17-19)
    [sun_info] => Array
        (
            [sunrise] => 05:41:44
            [transit] => 11:54:38
            [sunset] => 18:07:31
            [sun_length] => 12:25:47
        )

    [moon_info] => Array
        (
            [moonrise] => 05:42:00
            [moonset] => 18:35:00
            [moon_lenght] => 12:53:00
            [moon_phase] => Trăng mới
        )

    [moon_cycle] => Array
        (
            [illum_percent] => 0.14
            [age] => 29.178805773702
            [dist] => 381437.24095805
            [sundist] => 150750779.72164
            [new_moon] => 08/08/2021
            [first_quarter] => 15/08/2021
            [full_moon] => 22/08/2021
            [last_quarter] => 30/08/2021
            [next_new_moon] => 07/09/2021
            [next_first_quarter] => 14/09/2021
            [next_full_moon] => 21/09/2021
            [next_last_quarter] => 29/09/2021
        )

)

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.2% 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 ~1 days

Total

3

Last Release

1750d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8edc46f6221c65074f213cde36614ce36379355cba55053058b1479555d23a34?d=identicon)[khanhkid](/maintainers/khanhkid)

---

Top Contributors

[![mmsea-khanhvo](https://avatars.githubusercontent.com/u/162776540?v=4)](https://github.com/mmsea-khanhvo "mmsea-khanhvo (16 commits)")[![khanhkid](https://avatars.githubusercontent.com/u/5722692?v=4)](https://github.com/khanhkid "khanhkid (5 commits)")

---

Tags

datechinese calendarchinese-datelunar-datelunar-calendarenglish-to-lunar

### Embed Badge

![Health badge](/badges/khanhkid-lunar-date-convertor/health.svg)

```
[![Health](https://phpackages.com/badges/khanhkid-lunar-date-convertor/health.svg)](https://phpackages.com/packages/khanhkid-lunar-date-convertor)
```

###  Alternatives

[rlanvin/php-rrule

Lightweight and fast recurrence rules for PHP (RFC 5545)

70011.4M54](/packages/rlanvin-php-rrule)[knplabs/knp-time-bundle

Making your dates and durations look sensible and descriptive

6239.3M51](/packages/knplabs-knp-time-bundle)[league/period

Time range API for PHP

7335.7M22](/packages/league-period)[morilog/jalali

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in PHP applications, based on Jalali (Shamsi) DateTime class.

9241.2M49](/packages/morilog-jalali)[brick/date-time

Date and time library

3623.6M94](/packages/brick-date-time)[aeon-php/calendar

PHP type safe, immutable calendar library

20410.2M16](/packages/aeon-php-calendar)

PHPackages © 2026

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