|
|
|
@ -1,8 +1,6 @@
|
|
|
|
|
package org.springblade.common.utils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
|
import cn.hutool.core.io.unit.DataUnit; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
import org.springblade.common.constant.CommonConstant; |
|
|
|
@ -69,15 +67,15 @@ public class FileLogsUtil {
|
|
|
|
|
|
|
|
|
|
private static String makeDateString(Date date) { |
|
|
|
|
|
|
|
|
|
StringBuffer stringBuffer = new StringBuffer(); |
|
|
|
|
StringBuilder stringBuffer = new StringBuilder(); |
|
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
|
calendar.setTime(date); //放入Date类型数据
|
|
|
|
|
//获取年份
|
|
|
|
|
stringBuffer.append(calendar.get(Calendar.YEAR)+"/"); |
|
|
|
|
stringBuffer.append(calendar.get(Calendar.YEAR)).append("/"); |
|
|
|
|
//获取月份
|
|
|
|
|
stringBuffer.append(calendar.get(Calendar.MONTH) + 1+"/"); |
|
|
|
|
stringBuffer.append(calendar.get(Calendar.MONTH) + 1).append("/"); |
|
|
|
|
//获取日份
|
|
|
|
|
stringBuffer.append(calendar.get(Calendar.DATE)+"/"); |
|
|
|
|
stringBuffer.append(calendar.get(Calendar.DATE)).append("/"); |
|
|
|
|
return stringBuffer.toString(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|