公会流水统计时间筛选器优化
This commit is contained in:
@@ -229,6 +229,18 @@ public class TimeUtils {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static long getTimeMillis(String time, String format) {
|
||||
try {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.getDefault());
|
||||
Date date = formatter.parse(time);
|
||||
return date.getTime();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将毫秒数转为 MM:ss 的格式
|
||||
*
|
||||
|
Reference in New Issue
Block a user