|
@@ -55,7 +55,7 @@ public class DateFunc {
|
|
|
* @return String 今天
|
|
* @return String 今天
|
|
|
*/
|
|
*/
|
|
|
public static String getToday() {
|
|
public static String getToday() {
|
|
|
- return new SimpleDateFormat("yyyyMMdd").format(new Date());
|
|
|
|
|
|
|
+ return new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -74,7 +74,7 @@ public class DateFunc {
|
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
|
cal.add(Calendar.DATE, -1);
|
|
cal.add(Calendar.DATE, -1);
|
|
|
Date time = cal.getTime();
|
|
Date time = cal.getTime();
|
|
|
- return new SimpleDateFormat("yyyyMMdd").format(time);
|
|
|
|
|
|
|
+ return new SimpleDateFormat("yyyy-MM-dd").format(time);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|