TF-802 Show message when enable/disable vacation responder

This commit is contained in:
dab246
2022-08-18 17:04:55 +07:00
committed by Dat H. Pham
parent 20a2e94b8e
commit 593bf511e6
11 changed files with 166 additions and 29 deletions
@@ -18,7 +18,7 @@ extension PresentationEmailExtension on PresentationEmail {
String getReceivedAt(String newLocale, {String? pattern}) {
final emailTime = receivedAt;
if (emailTime != null) {
return emailTime.formatDate(
return emailTime.formatDateToLocal(
pattern: pattern ?? emailTime.value.toLocal().toPattern(),
locale: newLocale);
}
+9 -1
View File
@@ -3,11 +3,19 @@ import 'package:jmap_dart_client/jmap/core/utc_date.dart';
extension UTCDateExtension on UTCDate? {
String formatDate({String pattern = 'yMMMd', String locale = 'en_US'}) {
String formatDateToLocal({String pattern = 'yMMMd', String locale = 'en_US'}) {
if (this != null) {
return DateFormat(pattern, locale).format(this!.value.toLocal());
} else {
return '';
}
}
String formatDate({String pattern = 'yMMMd', String locale = 'en_US'}) {
if (this != null) {
return DateFormat(pattern, locale).format(this!.value);
} else {
return '';
}
}
}