jinpengyong
2022-01-17 3ddfa12fbc43e80e99e4959fbac8881eaa8e3ca3
screen-common/src/main/java/com/moral/util/DateUtils.java
@@ -651,6 +651,8 @@
        return new Date();
    }
    public static String getAfterNDays(Date date, int n, String formateStr) {
        SimpleDateFormat sdf = new SimpleDateFormat(formateStr);
        Calendar calendar = new GregorianCalendar();
@@ -1016,6 +1018,19 @@
        int year = cal.get(Calendar.YEAR);
        return year == currentYear;
    }
    /*
     * 判断日期是否为本月
     * */
    public static boolean isCurrentMonth(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date());
        int currentYear = cal.get(Calendar.MONTH);
        cal.setTime(date);
        int year = cal.get(Calendar.MONTH);
        return year == currentYear;
    }
    /**
     * 获取当前月的最后一天
@@ -1431,6 +1446,7 @@
        return calendar.getTime();
    }
    /**
     * <p>
     * Title: getDays