/**
* 参数名称:@param dateStr 待转换的日期(String格式,结构为yyyy-MM-dd)
* 返回值:String 小写汉字的日期
* 方法描述:土办法解决日期转换问题,转出格式为。。。 贰零壹陆年零壹月零捌日
* @author:zhouzhiwei
* 创建时间:2014-5-23 下午05:59:20
*/
public static String stringToChineseSmallRMB(String dateStr) {
// 传参数的格式为 2011-11-26
String resultStr = "";
String[] ss = dateStr.split("-");
for (int j = 0; j < ss[0].length(); j++) {
switch (ss[0].charAt(j)) {
case ‘0‘:
resultStr += "零";
break;
case ‘1‘:
resultStr += "壹";
break;
case ‘2‘:
resultStr += "贰";
break;
case ‘3‘:
resultStr += "叁";
break;
case ‘4‘:
resultStr += "肆";
break;
case ‘5‘:
resultStr += "伍";
break;
case ‘6‘:
resultStr += "陆";
break;
case ‘7‘:
resultStr += "柒";
break;
case ‘8‘:
resultStr += "捌";
break;
case ‘9‘:
resultStr += "玖";
break;
}
}
resultStr = resultStr + "年";
if (ss[1].equals("01")) {
resultStr += "零壹";
} else if (ss[1].equals("02")) {
resultStr += "零贰";
} else if (ss[1].equals("03")) {
resultStr += "叁";
} else if (ss[1].equals("04")) {
resultStr += "肆";
} else if (ss[1].equals("05")) {
resultStr += "伍";
} else if (ss[1].equals("06")) {
resultStr += "陆";
} else if (ss[1].equals("07")) {
resultStr += "柒";
} else if (ss[1].equals("08")) {
resultStr += "捌";
} else if (ss[1].equals("09")) {
resultStr += "玖";
} else if (ss[1].equals("10")) {
resultStr += "壹拾";
} else if (ss[1].equals("11")) {
resultStr += "壹拾壹";
} else {
resultStr += "壹拾贰";
}
resultStr += "月";
if (ss[2].equals("01")) {
resultStr += "零壹";
} else if (ss[2].equals("02")) {
resultStr += "零贰";
} else if (ss[2].equals("03")) {
resultStr += "零叁";
} else if (ss[2].equals("04")) {
resultStr += "零肆";
} else if (ss[2].equals("05")) {
resultStr += "零伍";
} else if (ss[2].equals("06")) {
resultStr += "零陆";
} else if (ss[2].equals("07")) {
resultStr += "零柒";
} else if (ss[2].equals("08")) {
resultStr += "零捌";
} else if (ss[2].equals("09")) {
resultStr += "零玖";
} else if (ss[2].equals("10")) {
resultStr += "壹拾";
} else if (ss[2].equals("11")) {
resultStr += "壹拾壹";
} else if (ss[2].equals("12")) {
resultStr += "壹拾贰";
} else if (ss[2].equals("13")) {
resultStr += "壹拾叁";
} else if (ss[2].equals("14")) {
resultStr += "壹拾肆";
} else if (ss[2].equals("15")) {
resultStr += "壹拾伍";
} else if (ss[2].equals("16")) {
resultStr += "壹拾陆";
} else if (ss[2].equals("17")) {
resultStr += "壹拾柒";
} else if (ss[2].equals("18")) {
resultStr += "壹拾捌";
} else if (ss[2].equals("19")) {
resultStr += "壹拾玖";
} else if (ss[2].equals("20")) {
resultStr += "贰拾";
} else if (ss[2].equals("21")) {
resultStr += "贰拾壹";
} else if (ss[2].equals("22")) {
resultStr += "贰拾贰";
} else if (ss[2].equals("23")) {
resultStr += "贰拾叁";
} else if (ss[2].equals("24")) {
resultStr += "贰拾肆";
} else if (ss[2].equals("25")) {
resultStr += "贰拾伍";
} else if (ss[2].equals("26")) {
resultStr += "贰拾陆";
} else if (ss[2].equals("27")) {
resultStr += "贰拾柒";
} else if (ss[2].equals("28")) {
resultStr += "贰拾捌";
} else if (ss[2].equals("29")) {
resultStr += "贰拾玖";
} else if (ss[2].equals("30")) {
resultStr += "叁拾";
} else if (ss[2].equals("31")) {
resultStr += "叁拾壹";
}
resultStr += "日";
return resultStr;
}