l10n: Fix date on memories widget
This commit is contained in:
parent
42088e92fb
commit
dc471f9509
2 changed files with 6 additions and 13 deletions
|
@ -2,13 +2,13 @@ import "dart:io";
|
|||
|
||||
import "package:flutter/cupertino.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:intl/intl.dart";
|
||||
import "package:photos/models/memory.dart";
|
||||
import "package:photos/services/memories_service.dart";
|
||||
import "package:photos/theme/text_style.dart";
|
||||
import "package:photos/ui/actions/file/file_actions.dart";
|
||||
import "package:photos/ui/extents_page_view.dart";
|
||||
import "package:photos/ui/viewer/file/file_widget.dart";
|
||||
import "package:photos/utils/date_time_util.dart";
|
||||
import "package:photos/utils/file_util.dart";
|
||||
import "package:photos/utils/share_util.dart";
|
||||
import "package:step_progress_indicator/step_progress_indicator.dart";
|
||||
|
@ -89,8 +89,11 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {
|
|||
),
|
||||
),
|
||||
Text(
|
||||
getFormattedDate(
|
||||
DateTime.fromMicrosecondsSinceEpoch(file.creationTime!),
|
||||
DateFormat.yMMMd(Localizations.localeOf(context).languageCode)
|
||||
.format(
|
||||
DateTime.fromMicrosecondsSinceEpoch(
|
||||
file.creationTime!,
|
||||
),
|
||||
),
|
||||
style: Theme.of(context).textTheme.subtitle1!.copyWith(
|
||||
fontSize: 14,
|
||||
|
|
|
@ -46,7 +46,6 @@ Map<int, String> _days = {
|
|||
final currentYear = DateTime.now().year;
|
||||
const searchStartYear = 1970;
|
||||
|
||||
|
||||
int daysBetween(DateTime from, DateTime to) {
|
||||
from = DateTime(from.year, from.month, from.day);
|
||||
to = DateTime(to.year, to.month, to.day);
|
||||
|
@ -132,15 +131,6 @@ String getFormattedTime(DateTime dateTime) {
|
|||
getTime(dateTime);
|
||||
}
|
||||
|
||||
//30 Jun'22
|
||||
String getFormattedDate(DateTime dateTime) {
|
||||
return dateTime.day.toString() +
|
||||
" " +
|
||||
getMonth(dateTime) +
|
||||
"'" +
|
||||
getAbbreviationOfYear(dateTime);
|
||||
}
|
||||
|
||||
String daysLeft(int futureTime) {
|
||||
final int daysLeft = ((futureTime - DateTime.now().microsecondsSinceEpoch) /
|
||||
Duration.microsecondsPerDay)
|
||||
|
|
Loading…
Add table
Reference in a new issue