mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +08:00
Workaround intl bug by harding 'en' locale
https://github.com/dart-lang/intl/issues/266 This is strange since Intl.getLocale() returns 'en_US' in my case. Currently, GitJournal only supports 'english' anyway, so this shouldn't be a big problem.
This commit is contained in:
@ -13,8 +13,8 @@ class JournalView extends StatelessWidget {
|
||||
final NotesFolder folder;
|
||||
final String emptyText;
|
||||
|
||||
static final _dateFormat = DateFormat('dd MMM, yyyy ');
|
||||
static final _timeFormat = DateFormat('Hm');
|
||||
static final _dateFormat = DateFormat('dd MMM, yyyy ', 'en');
|
||||
static final _timeFormat = DateFormat('Hm', 'en');
|
||||
|
||||
JournalView({
|
||||
@required this.folder,
|
||||
|
@ -22,7 +22,7 @@ class StandardView extends StatelessWidget {
|
||||
final StandardViewHeader headerType;
|
||||
final bool showSummary;
|
||||
|
||||
static final _dateFormat = DateFormat('dd MMM, yyyy');
|
||||
static final _dateFormat = DateFormat('dd MMM, yyyy', 'en');
|
||||
|
||||
StandardView({
|
||||
@required this.folder,
|
||||
|
@ -189,7 +189,7 @@ class GitHostSetupRepoSelectorState extends State<GitHostSetupRepoSelector> {
|
||||
}
|
||||
|
||||
Widget _buildRepoTile(GitHostRepo repo) {
|
||||
final _dateFormat = DateFormat('dd MMM, yyyy');
|
||||
final _dateFormat = DateFormat('dd MMM, yyyy', 'en');
|
||||
|
||||
Widget trailing = Container();
|
||||
if (repo.updatedAt != null) {
|
||||
|
@ -2,8 +2,8 @@ import 'dart:core';
|
||||
import 'package:gitjournal/utils/logger.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
final _simpleDateFormat = DateFormat("yyyy-MM-dd-HH-mm-ss");
|
||||
final _iso8601DateFormat = DateFormat("yyyy-MM-ddTHH:mm:ss");
|
||||
final _simpleDateFormat = DateFormat("yyyy-MM-dd-HH-mm-ss", 'en');
|
||||
final _iso8601DateFormat = DateFormat("yyyy-MM-ddTHH:mm:ss", 'en');
|
||||
|
||||
String toSimpleDateTime(DateTime dt) {
|
||||
return _simpleDateFormat.format(dt);
|
||||
|
@ -12,8 +12,8 @@ class JournalEditorHeader extends StatelessWidget {
|
||||
if (note.created == null) {
|
||||
return Container();
|
||||
}
|
||||
var dateStr = DateFormat('MMMM, yyyy').format(note.created);
|
||||
var timeStr = DateFormat('EEEE HH:mm').format(note.created);
|
||||
var dateStr = DateFormat('MMMM, yyyy', 'en').format(note.created);
|
||||
var timeStr = DateFormat('EEEE HH:mm', 'en').format(note.created);
|
||||
|
||||
var bigNum = Text(
|
||||
note.created.day.toString(),
|
||||
|
Reference in New Issue
Block a user