Date date = new Date();
int month = DateUtil.month(date) + 1;
String monthStr = "";
if (month <= 9) {
monthStr = "0" + month;
} else {
monthStr = String.valueOf(month);
}
String dayStr = "";
int day = DateUtil.dayOfMonth(date);
if (day < 10) {
dayStr = "0" + day;
} else {
dayStr = String.valueOf(day);
}
String encryStr = DateUtil.year(date) + monthStr + dayStr;
对于烂代码是否应该扣绩效:
如果你是老板:应该
如果不是:跟你没啥关系