riku
2025-10-31 1897c4ad5fa73b3f0a36e1aa0e1e9000302a6ace
app/src/main/java/cn/flightfeather/thirdappmodule/util/DateUtil.kt
@@ -151,13 +151,13 @@
        return weekDays[index]
    }
    fun parseYearMonth(str: String): Date {
        try {
            return SimpleDateFormat("yyyy-MM", Locale.getDefault()).parse(str)
    fun parseYearMonth(str: String?): Date? {
        return try {
            SimpleDateFormat("yyyy-MM", Locale.getDefault()).parse(str)
        } catch (e: Exception) {
            e.printStackTrace()
            null
        }
        return Date()
    }
    fun parseYearToMin(str: String): Date {