@[TOC]日期连续时间
String week= “01,05,06,07,08”;
String[] strings = week.split(",");
int[] array = Arrays.asList(strings).stream().mapToInt(Integer::parseInt).toArray();
String result = convert(array,0);
StringBuilder builder = new StringBuilder();
List weekResult = Arrays.asList(result.split(","));
for (int i = 0; i < weekResult.size(); i++) {
builder.append(“周” + weekResult.get(i).replace("-", “至周”)
.replace(“1”, “一”)
.replace(“2”, “二”)
.replace(“3”, “三”)
.replace(“4”, “四”)
.replace(“5”, “五”)
.replace(“6”, “六”)
.replace(“7”, “日”) + “,”);
}
String s = weekResult.size() > 0 ? builder.deleteCharAt(builder.length() - 1).toString() : “”;
public String convert(int[] NoNum, int state){
String result = "";
for (int i = 0; i < NoNum.length; i++)