调用方法:
$lunar = new Lunar();
$month = $lunar->convertSolarToLunar(date('Y'),date('m'),date('d'));
print_r($month);
运行结果:
Array ( [0] => 2017 [1] => 闰六月 [2] => 十七 [3] => 丁酉 [4] => 7 [5] => 17 [6] => 鸡 [7] => 6 )
PS:这里再为大家推荐几款日历相关在线工具供大家参考:
网页万年历日历:
http://tools.jb51.net/bianmin/webwannianli
在线阴历/阳历转换工具:
http://tools.jb51.net/bianmin/yinli2yangli
在线万年历日历:
http://tools.jb51.net/bianmin/wannianli
在线万年历黄历flash版:
http://tools.jb51.net/bianmin/flashwnl
另外,本站历史上的今天也有相似的农历日期显示功能:
http://tools.jb51.net/bianmin/lishi
更多关于PHP相关内容感兴趣的读者可查看本站专题:《php日期与时间用法总结》、《PHP数组(Array)操作技巧大全》、《PHP基本语法入门教程》、《PHP运算与运算符用法总结》、《php面向对象程序设计入门教程》及《php字符串(string)用法总结》
希望本文所述对大家PHP程序设计有所帮助。







