Commit 2c8134e3 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent dfada42c
......@@ -875,21 +875,21 @@ public class DateUtil {
}
/**
* 获得指定日期的日期
* 获得指定天数的日期
*
* @param i
* @return
* @Author fxj
* @Date 2019-09-18
**/
public static Date getDateByDayNum(int i) {
public static String getDateByDayNum(int i) {
// 取时间
Date date = new Date();
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
// 把日期往后增加一个月.整数往后推,负数往前移动
calendar.add(Calendar.DAY_OF_MONTH, i);
return calendar.getTime();
return formatDate(calendar.getTime());
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment