Java怎样编程实现农历和阳历转换

如题所述

public class TestNongLi {
public static void main(String[] args) {
// 调用农历日期转换阳历日期方法
System.out.println(ChineseCalendar.sCalendarLundarToSolar(2008, 1, 1));
}
}
// 自定义日历类
class ChineseCalendar {
// Array lIntLunarDay is stored in the monthly day information in every year from 1901 to 2100 of the lunar calendar,
// The lunar calendar can only be 29 or 30 days every month, express with 12(or 13) pieces of binary bit in one year,
// it is 30 days for 1 form in the corresponding location , otherwise it is 29 days
private static final int[] iLunarmont
温馨提示:答案为网友推荐,仅供参考
相似回答