Skip to content
/ s2m2 Public

a php program converts gregorian calendar to chinese calendar

Notifications You must be signed in to change notification settings

shenlian8/s2m2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Welcome to the s2m2 wiki!

This is a PHP-program to show, how to convert Gregorian Calendar to Chinese Calendar. The range of the input is from 1901-01-01 to 2100-12-31 世纪万年历 1901-01-01 至 2100-12-31

s2m2

Demo

It returns an array:

Array ( [year] => 数字农历年
        [cyear] => 中文农历年 
        [yearten] => 数字天干
        [cyearten] => 中文天干
        [yeartwelve] => 数字地支
        [cyeartwelve] => 中文地支
        [month] => 数字农历月,闰月用1xx的形式表示比如闰5月为105
        [cmonth] => 中文农历月
        [day] => 数字农历日
        [cday] => 中文农历日
        [weekday] => 数字星期日期,〇为星期天
        [cweekday] => 中文星期日期 ) 

To use the the class:

$a = new s2m();
$re = $a->getMDate(2001, 3, 12);
print_r($re);

About

a php program converts gregorian calendar to chinese calendar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages