s = \二十\ break; case 30:
s = \三十\ break; default:
s = nStr2[(int) (d / 10)];//取商 s += nStr1[d % 10];//取余 }
return (s); }
private static String cYear(int y) { String s = \ int d;
while (y > 0) { d = y % 10; y = (y - d) / 10;
s = yearName[d] + s; }
return (s); }
public static String getLunar(String year, String month, String day) { Date sDObj; String s;
int SY, SM, SD; int sy;
SY = Integer.parseInt(year); SM = Integer.parseInt(month); SD = Integer.parseInt(day); sy = (SY - 4) % 12;
Calendar cl = Calendar.getInstance(); cl.set(SY, SM - 1, SD); sDObj = cl.getTime(); //日期
Lunar1(sDObj); //农历
s = \农历 \【\】\年\
s += (getIsLeap() ? \闰\月\getMonth()) == 29 ? \小\大\ s += cDay(getDay()) + \
s += cyclical(getYearCyl()) + \年\+ cyclical(getMonCyl()) + \月\cyclical(getDayCyl()) + \日\ return s; }
public static void main(String[] args) {
System.out.println(getLunar(\ System.out.println(getLunar(\ System.out.println(getLunar(\ System.out.println(getLunar(\ } }
相关推荐: