更新
This commit is contained in:
@@ -162,6 +162,17 @@ class MyUtils {
|
||||
String twoDigits(int n) => n.toString().padLeft(2, '0');
|
||||
return '${twoDigits(date.month)}/${twoDigits(date.day)}';
|
||||
}
|
||||
|
||||
static String getFormatChineseTime(date) {
|
||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(date);
|
||||
// 格式化年月日
|
||||
String dateStr = DateFormat('yyyy年MM月dd日').format(dateTime);
|
||||
// 获取星期
|
||||
const weekDays = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'];
|
||||
String weekStr = weekDays[dateTime.weekday - 1];
|
||||
|
||||
return '$dateStr $weekStr';
|
||||
}
|
||||
}
|
||||
|
||||
Color stringToColor(String hexColor) {
|
||||
@@ -323,7 +334,6 @@ String time_08_Formatter_pattern(String time, String pattern) {
|
||||
return DateFormat(pattern).format(DateTime.parse(time).toLocal());
|
||||
}
|
||||
|
||||
|
||||
enum LoadingDialogIcon { ble, wifi, none }
|
||||
|
||||
class LoadingDialog {
|
||||
|
||||
Reference in New Issue
Block a user