zhangmei
2025-03-10 21af5de4dcab413fd9e13b66263b5e43dc868e7a
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
@@ -340,6 +340,16 @@
        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        return df.format(time);
    }
    /**
     * localdatetime转为字符串
     *
     * @param time localdatetime
     * @return 字符串
     */
    public static String localDateTimeToStringYear(LocalDateTime time) {
        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
        return df.format(time);
    }
    /**
     * Date转为LocalDateTime