public class Mouth2SeasonUtil {
public static int Mouth2Season(String mouth) throws Exception {
int imouth = NumberParseUtil.parseInt(mouth);
if (imouth < 4) {
return 1;//第一季度
} else if (imouth > 3 && imouth < 7) {
return 2;
} else if (imouth > 6 && imouth < 10) {
return 3;
} else if (imouth > 9 && imouth < 13) {
return 4;
} else {
throw new Exception("超出范围");
}
}
}
public static int Mouth2Season(String mouth) throws Exception {
int imouth = NumberParseUtil.parseInt(mouth);
if (imouth < 4) {
return 1;//第一季度
} else if (imouth > 3 && imouth < 7) {
return 2;
} else if (imouth > 6 && imouth < 10) {
return 3;
} else if (imouth > 9 && imouth < 13) {
return 4;
} else {
throw new Exception("超出范围");
}
}
}