(本例将 2014年1月9日转换为农历)
Program www_fcode_cn implicit none external GetLunarInfo !外部函数 integer(4) GetLunarInfo, nowYear, nowMonth, nowDay integer(1) Lunar_month, Lunar_day character*22 strInfo integer i nowyear=2014; nowMonth=1; nowDay=9 i = GetLunarInfo(nowyear, nowmonth, nowday, Lunar_month, Lunar_day, strInfo) print*, Lunar_month, Lunar_day, strInfo End Program www_fcode_cn
完整代码请通过本地下载
/download/fcode/GetLunarDate.zip