opt: shortenChineseDateString

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-01 12:54:47 +08:00
parent dbc93883e8
commit 269fb033e0

View File

@@ -595,7 +595,9 @@ class Utils {
return date.contains("")
? RegExp(r'\d+')
.allMatches(date)
.map((match) => match.group(0))
.map((match) => match.group(0)?.length == 4
? match.group(0)!.substring(2)
: match.group(0))
.join('-')
: date;
// if (date.contains("年")) return '${date.split("年").first}年';