mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: shortenChineseDateString
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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}年';
|
||||
|
||||
Reference in New Issue
Block a user