mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: app端推荐添加时间显示(测试)
This commit is contained in:
@@ -167,6 +167,11 @@ class Utils {
|
||||
return '${hour > 0 ? "${paddingStr(hour)}:" : ""}${paddingStr(minute)}:${paddingStr(second)}';
|
||||
}
|
||||
|
||||
static String shortenChineseDateString(String date) {
|
||||
if (date.contains("年")) return '${date.split("年").first}年';
|
||||
return date;
|
||||
}
|
||||
|
||||
// 完全相对时间显示
|
||||
static String formatTimestampToRelativeTime(timeStamp) {
|
||||
var difference = DateTime.now()
|
||||
|
||||
Reference in New Issue
Block a user