endian11
2020-10-26 e95d97fece2929943b7576d5cd5f55f8bff4f23a
app/src/main/java/safeluck/drive/evaluation/util/Utils.java
@@ -572,7 +572,16 @@
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }
    public static boolean isNumber(String str) {
        //采用正则表达式的方式来判断一个字符串是否为数字,这种方式判断面比较全
        //可以判断正负、整数小数
        boolean isInt = Pattern.compile("^-?[1-9]\\d*$").matcher(str).find();
        boolean isDouble = Pattern.compile("^-?([1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*|0?\\.0+|0)$").matcher(str).find();
        return isInt || isDouble;
    }
    public static long dateToLongSec(String utc) {
//        MyLog.i("dateToLongSec:"+utc);
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");