Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-01 08:57:58 +08:00
parent 952fd5fc38
commit 7df4c5c4c7

View File

@@ -589,8 +589,14 @@ class Utils {
} }
static String shortenChineseDateString(String date) { static String shortenChineseDateString(String date) {
if (date.contains("")) return '${date.split("").first}'; return date.contains("")
return date; ? RegExp(r'\d+')
.allMatches(date)
.map((match) => match.group(0))
.join('-')
: date;
// if (date.contains("年")) return '${date.split("年").first}年';
// return date;
} }
// 完全相对时间显示 // 完全相对时间显示