PHPackages                             avexsoft/chinese-lunar-calendar - 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. avexsoft/chinese-lunar-calendar

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

avexsoft/chinese-lunar-calendar
===============================

Converts from Gregorian date to Chinese lunisolar date and vice versa.

1.0.0(5y ago)0692[1 PRs](https://github.com/avexsoft/chinese-lunar-calendar/pulls)Apache-2.0PHPPHP &gt;=5.3.0

Since Mar 22Pushed 3y agoCompare

[ Source](https://github.com/avexsoft/chinese-lunar-calendar)[ Packagist](https://packagist.org/packages/avexsoft/chinese-lunar-calendar)[ Docs](https://github.com/avexsoft/chinese-lunar-calendar)[ RSS](/packages/avexsoft-chinese-lunar-calendar/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Chinese Lunar Calendar
======================

[](#chinese-lunar-calendar)

Converts from Gregorian date to Chinese lunisolar date and vice versa. Accepts dates between the years 1900-2100.

Notice
------

[](#notice)

This was cloned from the now abandoned  as our attempts to reach him failed. Avexsoft is committed to maintaining this, PRs welcomed.

Usage
-----

[](#usage)

```
use Avexsoft\Lunar\Lunar;

$gregorianDate = '2017-08-23';

$chineseDate = Lunar::Gregorian2Lunar($gregorianDate);

/*
array(7) {
  ["y"]=>
  int(2017)
  ["m"]=>
  int(7)
  ["d"]=>
  int(2)
  ["leap"]=>
  bool(false)
  ["zh-cn"]=>
  string(12) "七月初二"
  ["zh-hk"]=>
  string(12) "七月初二"
  ["ja"]=>
  string(12) "七月初二"
  ["en"]=>
  string(5) "07-02"
}
*/
#-------------------------------------------------

$chineseDate = '2017-07-2';

$gregorianDate = Lunar::Lunar2Gregorian($chineseDate);

var_dump($gregorianDate);

/*
array(3) {
  ["y"]=>
  int(2017)
  ["m"]=>
  int(8)
  ["d"]=>
  int(23)
}
*/
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

1877d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/53545524?v=4)[Avexsoft](/maintainers/avexsoft)[@avexsoft](https://github.com/avexsoft)

---

Tags

datechinese calendarchinese-datelunar-datelunar-calendar

### Embed Badge

![Health badge](/badges/avexsoft-chinese-lunar-calendar/health.svg)

```
[![Health](https://phpackages.com/badges/avexsoft-chinese-lunar-calendar/health.svg)](https://phpackages.com/packages/avexsoft-chinese-lunar-calendar)
```

###  Alternatives

[rlanvin/php-rrule

Lightweight and fast recurrence rules for PHP (RFC 5545)

69810.6M39](/packages/rlanvin-php-rrule)[knplabs/knp-time-bundle

Making your dates and durations look sensible and descriptive

6308.9M39](/packages/knplabs-knp-time-bundle)[league/period

Time range API for PHP

7335.4M21](/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.

9201.2M45](/packages/morilog-jalali)[brick/date-time

Date and time library

3623.3M61](/packages/brick-date-time)[aeon-php/calendar

PHP type safe, immutable calendar library

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

PHPackages © 2026

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