TF-46 Create object, builder for model and core module

This commit is contained in:
dab246
2021-08-26 17:03:04 +07:00
committed by Dat H. Pham
parent b70fc6edb8
commit 17bad5ec51
21 changed files with 203 additions and 12 deletions
@@ -0,0 +1,13 @@
import 'package:intl/intl.dart';
import 'package:jmap_dart_client/jmap/core/utc_date.dart';
extension UTCDateExtension on UTCDate? {
String formatDate({String pattern = 'yMMMd', String locale = 'en_US'}) {
if (this != null) {
return DateFormat(pattern, locale).format(this!.value);
} else {
return '';
}
}
}