优化代码

This commit is contained in:
jy.hu
2014-11-11 11:23:21 +08:00
parent f93719de2f
commit 717b9c7abf
5 changed files with 25 additions and 22 deletions
@@ -22,9 +22,11 @@ public class DateUtil {
public static String fortmat2yyyyMMdd(Date date) {
return new SimpleDateFormat(yyyyMMdd).format(date);
}
public static String fortmat2yyyy_MM_dd(Date date) {
return new SimpleDateFormat(yyyy_MM_dd).format(date);
}
public static String fortmat2yyyyMMddHHmmss(Date date) {
return new SimpleDateFormat(yyyyMMddHHmmss).format(date);
}
@@ -41,4 +43,8 @@ public class DateUtil {
public static String formaFee2Fen(double fee) {
return new DecimalFormat("#").format(fee * 100);
}
public static String timestamp2string() {
return String.valueOf(System.currentTimeMillis() / 1000);
}
}