You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
490 B
16 lines
490 B
import 'package:intl/intl.dart';
|
|
import 'package:cake_wallet/di.dart';
|
|
import 'package:cake_wallet/store/settings_store.dart';
|
|
|
|
class DateFormatter {
|
|
static String get currentLocalFormat {
|
|
final isUSA = getIt.get<SettingsStore>().languageCode.toLowerCase() == 'en';
|
|
final format = isUSA ? 'yyyy.MM.dd, HH:mm' : 'dd.MM.yyyy, HH:mm';
|
|
|
|
return format;
|
|
}
|
|
|
|
static DateFormat withCurrentLocal() =>
|
|
DateFormat(currentLocalFormat, getIt.get<SettingsStore>().languageCode);
|
|
}
|