feat:增加博客卡片内容
This commit is contained in:
13
lib/utils/date_utils.dart
Normal file
13
lib/utils/date_utils.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
String formatDate(DateTime date) {
|
||||
return DateFormat('yyyy-MM-dd').format(date);
|
||||
}
|
||||
|
||||
String formatDateString(String date) {
|
||||
return DateFormat('yyyy-MM-dd').format(DateTime.parse(date));
|
||||
}
|
||||
|
||||
String formatTime(DateTime datetime) {
|
||||
return DateFormat('yyyy-MM-dd HH:mm:ss').format(datetime);
|
||||
}
|
||||
Reference in New Issue
Block a user