mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-19 07:50:52 +01:00
Format date according to locale
This commit is contained in:
@@ -69,9 +69,7 @@ class NutritionalPlansList extends StatelessWidget {
|
||||
arguments: currentPlan,
|
||||
);
|
||||
},
|
||||
title: Text(
|
||||
DateFormat('dd.MM.yyyy').format(currentPlan.creationDate).toString(),
|
||||
),
|
||||
title: Text(DateFormat.yMd().format(currentPlan.creationDate)),
|
||||
subtitle: Text(currentPlan.description),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -50,7 +50,7 @@ class WeightEntriesList extends StatelessWidget {
|
||||
Scaffold.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
"Deleted weight entry for the ${DateFormat('dd.MM.yyyy').format(currentEntry.date).toString()}",
|
||||
"Deleted weight entry for the ${DateFormat.yMd().format(currentEntry.date).toString()}",
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
@@ -77,9 +77,7 @@ class WeightEntriesList extends StatelessWidget {
|
||||
// arguments: currentPlan,
|
||||
//),
|
||||
onTap: () {},
|
||||
title: Text(
|
||||
DateFormat('dd.MM.yyyy').format(currentEntry.date).toString(),
|
||||
),
|
||||
title: Text(DateFormat.yMd().format(currentEntry.date).toString()),
|
||||
subtitle: Text('${currentEntry.weight} kg'),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -75,7 +75,7 @@ class _WorkoutPlanDetailState extends State<WorkoutPlanDetail> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
DateFormat('dd.MM.yyyy').format(widget._workoutPlan.creationDate).toString(),
|
||||
DateFormat.yMd().format(widget._workoutPlan.creationDate).toString(),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -97,9 +97,7 @@ class WorkoutPlansList extends StatelessWidget {
|
||||
WorkoutPlanScreen.routeName,
|
||||
arguments: currentWorkout,
|
||||
),
|
||||
title: Text(
|
||||
DateFormat('dd.MM.yyyy').format(currentWorkout.creationDate).toString(),
|
||||
),
|
||||
title: Text(DateFormat.yMd().format(currentWorkout.creationDate)),
|
||||
subtitle: Text(currentWorkout.description),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user