Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 114 | All time: 9,593 This week: 73![]() |
Version | License | PHP version | Categories | |||
chinese-lunar-calend 1.0.0 | Custom (specified... | 5 | PHP 5, Time and Date |
Description | Author | |
This class can convert Gregorian date to Chinese lunisolar. Innovation Award
|
Converts from Gregorian date to Chinese lunisolar date and vice versa. Accepts dates between the years 1900-2100.
use peterkahl\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)
}
*/
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
![]() | chinese-lunar-calend-2019-02-09.zip 9KB |
![]() | chinese-lunar-calend-2019-02-09.tar.gz 9KB |
![]() | Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.