mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(mobile): improve date formatting (#1804)
This commit is contained in:
@@ -123,9 +123,9 @@ class AlbumViewerPage extends HookConsumerWidget {
|
||||
final DateTime startDate = album.assets.first.fileCreatedAt;
|
||||
final DateTime endDate = album.assets.last.fileCreatedAt; //Need default.
|
||||
final String startDateText =
|
||||
DateFormat(startDate.year == endDate.year ? 'LLL d' : 'LLL d, y')
|
||||
(startDate.year == endDate.year ? DateFormat.MMMd() : DateFormat.yMMMd())
|
||||
.format(startDate);
|
||||
final String endDateText = DateFormat('LLL d, y').format(endDate);
|
||||
final String endDateText = DateFormat.yMMMd().format(endDate);
|
||||
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(
|
||||
@@ -134,7 +134,7 @@ class AlbumViewerPage extends HookConsumerWidget {
|
||||
bottom: album.shared ? 0.0 : 8.0,
|
||||
),
|
||||
child: Text(
|
||||
"$startDateText-$endDateText",
|
||||
"$startDateText - $endDateText",
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
Reference in New Issue
Block a user