jiangping
2023-10-08 d3d1b082c49f13abda7e1b73964f7f7fa62105b0
server/services/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -293,6 +293,15 @@
            throw e;
        }
    }
    public static String getShortDateStr(Date date)   {
        String nowDate = "";
        try {
            nowDate = sdfShort.format(date);
            return nowDate;
        } catch (Exception e) {
            throw e;
        }
    }
    /**
     * Descrption:取得当前日期,格式为:YYYY-MM-DD
@@ -2298,6 +2307,16 @@
            return new Timestamp(System.currentTimeMillis());
        }
    }
    public static Date getDateFromString2(String strDate) {
        if (StringUtils.isEmpty(strDate)) {
            return new Date(System.currentTimeMillis());
        }
        try {
            return sdfLongTimePlus.parse(strDate);
        } catch (Exception ex) {
           return  null;
        }
    }
    // -----------------------------------------------------------------------
    public static Date parseFromFormats(String aValue) {