初始化

This commit is contained in:
谢宇宁
2026-09-15 15:44:13 +07:00
commit a23ba685e9
1065 changed files with 101122 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import 'package:intl/intl.dart';
extension DateTimeNullableX on DateTime? {
String yyyyMMDDFormat({String gap = "-"}) {
if (this == null) return "";
return DateFormat("yyyy${gap}MM${gap}dd HH:mm:ss").format(this!);
}
String ymdSMFormat({String gap = "-"}) {
if (this == null) return "";
return DateFormat("yyyy${gap}MM${gap}dd HH:mm").format(this!);
}
}