liukangdong
2024-11-19 59fb524d6b081f0faba177ffd13a0132d314dbae
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -460,7 +460,7 @@
     * @return String
     * @throws Exception
     */
    public static String getPlusTime(Date date) throws Exception {
    public static String getPlusTime(Date date)  {
        if (date == null)
            return null;
        try {
@@ -1283,6 +1283,9 @@
     * @return
     */
    public static Date getXMinuteAfterDate(Date date, int minute) {
        if(date ==null){
            date = new Date();
        }
        Calendar now = Calendar.getInstance();
        now.setTime(date);
        now.set(Calendar.MINUTE, now.get(Calendar.MINUTE) + minute);
@@ -1635,6 +1638,13 @@
            return "";
        }
    }
    public static String getFirstDayCurrentMonth() {
        try {
            return getDateLong(new Date()).substring(0, 7) + "-01";
        } catch (Exception e) {
            return "";
        }
    }
    /**
     * 将yyyyMM各式转换成yyyy年MM月格式