mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 19:36:25 +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 NotesFolder folder;
|
||||||
final String emptyText;
|
final String emptyText;
|
||||||
|
|
||||||
static final _dateFormat = DateFormat('dd MMM, yyyy ');
|
static final _dateFormat = DateFormat('dd MMM, yyyy ', 'en');
|
||||||
static final _timeFormat = DateFormat('Hm');
|
static final _timeFormat = DateFormat('Hm', 'en');
|
||||||
|
|
||||||
JournalView({
|
JournalView({
|
||||||
@required this.folder,
|
@required this.folder,
|
||||||
|
@ -22,7 +22,7 @@ class StandardView extends StatelessWidget {
|
|||||||
final StandardViewHeader headerType;
|
final StandardViewHeader headerType;
|
||||||
final bool showSummary;
|
final bool showSummary;
|
||||||
|
|
||||||
static final _dateFormat = DateFormat('dd MMM, yyyy');
|
static final _dateFormat = DateFormat('dd MMM, yyyy', 'en');
|
||||||
|
|
||||||
StandardView({
|
StandardView({
|
||||||
@required this.folder,
|
@required this.folder,
|
||||||
|
@ -189,7 +189,7 @@ class GitHostSetupRepoSelectorState extends State<GitHostSetupRepoSelector> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildRepoTile(GitHostRepo repo) {
|
Widget _buildRepoTile(GitHostRepo repo) {
|
||||||
final _dateFormat = DateFormat('dd MMM, yyyy');
|
final _dateFormat = DateFormat('dd MMM, yyyy', 'en');
|
||||||
|
|
||||||
Widget trailing = Container();
|
Widget trailing = Container();
|
||||||
if (repo.updatedAt != null) {
|
if (repo.updatedAt != null) {
|
||||||
|
@ -2,8 +2,8 @@ import 'dart:core';
|
|||||||
import 'package:gitjournal/utils/logger.dart';
|
import 'package:gitjournal/utils/logger.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
final _simpleDateFormat = DateFormat("yyyy-MM-dd-HH-mm-ss");
|
final _simpleDateFormat = DateFormat("yyyy-MM-dd-HH-mm-ss", 'en');
|
||||||
final _iso8601DateFormat = DateFormat("yyyy-MM-ddTHH:mm:ss");
|
final _iso8601DateFormat = DateFormat("yyyy-MM-ddTHH:mm:ss", 'en');
|
||||||
|
|
||||||
String toSimpleDateTime(DateTime dt) {
|
String toSimpleDateTime(DateTime dt) {
|
||||||
return _simpleDateFormat.format(dt);
|
return _simpleDateFormat.format(dt);
|
||||||
|
@ -12,8 +12,8 @@ class JournalEditorHeader extends StatelessWidget {
|
|||||||
if (note.created == null) {
|
if (note.created == null) {
|
||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
var dateStr = DateFormat('MMMM, yyyy').format(note.created);
|
var dateStr = DateFormat('MMMM, yyyy', 'en').format(note.created);
|
||||||
var timeStr = DateFormat('EEEE HH:mm').format(note.created);
|
var timeStr = DateFormat('EEEE HH:mm', 'en').format(note.created);
|
||||||
|
|
||||||
var bigNum = Text(
|
var bigNum = Text(
|
||||||
note.created.day.toString(),
|
note.created.day.toString(),
|
||||||
|
Reference in New Issue
Block a user