mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
use DateFormat pinned to the built in locale for the group date
This commit is contained in:
parent
88020b362a
commit
71cfed1cf6
1 changed files with 3 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
const int _maxMillisecondsSinceEpoch = 8640000000000000; // 275760-09-13
|
const int _maxMillisecondsSinceEpoch = 8640000000000000; // 275760-09-13
|
||||||
const int _minMillisecondsSinceEpoch = -62135596800000; // 0001-01-01
|
const int _minMillisecondsSinceEpoch = -62135596800000; // 0001-01-01
|
||||||
|
|
||||||
|
|
@ -18,6 +20,4 @@ DateTime? tryFromSecondsSinceEpoch(int? secondsSinceEpoch, {bool isUtc = false})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// no DateFormat: it tracks Intl.defaultLocale and needs locale init per isolate
|
String timelineGroupDate(DateTime value) => DateFormat('yyyy-MM-dd', 'en_US').format(value);
|
||||||
String timelineGroupDate(DateTime value) =>
|
|
||||||
'${value.year.toString().padLeft(4, '0')}-${value.month.toString().padLeft(2, '0')}-${value.day.toString().padLeft(2, '0')}';
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue