Use day-first written dates and 24-hour chat timestamps
This commit is contained in:
@@ -31,23 +31,16 @@ class ChatMessageTimestamp extends StatelessWidget {
|
||||
if (material != null) {
|
||||
time = material.formatTimeOfDay(
|
||||
TimeOfDay.fromDateTime(instant),
|
||||
alwaysUse24HourFormat: MediaQuery.alwaysUse24HourFormatOf(context),
|
||||
alwaysUse24HourFormat: true,
|
||||
);
|
||||
date = material.formatCompactDate(instant);
|
||||
full = '${material.formatFullDate(instant)}, $time';
|
||||
date = '${instant.day} ${material.formatMonthYear(instant)}';
|
||||
full = '$date, $time';
|
||||
} else {
|
||||
final local = CupertinoLocalizations.of(context);
|
||||
final use24 = MediaQuery.alwaysUse24HourFormatOf(context);
|
||||
final hour = use24
|
||||
? instant.hour
|
||||
: (instant.hour % 12 == 0 ? 12 : instant.hour % 12);
|
||||
final period = use24
|
||||
? ''
|
||||
: ' ${instant.hour < 12 ? local.anteMeridiemAbbreviation : local.postMeridiemAbbreviation}';
|
||||
time =
|
||||
'${local.datePickerHour(hour)}:${local.datePickerMinute(instant.minute)}$period';
|
||||
'${local.datePickerHour(instant.hour).padLeft(2, '0')}:${local.datePickerMinute(instant.minute)}';
|
||||
date =
|
||||
'${local.datePickerMediumDate(instant)} ${local.datePickerYear(instant.year)}';
|
||||
'${local.datePickerDayOfMonth(instant.day)} ${local.datePickerMonth(instant.month)} ${local.datePickerYear(instant.year)}';
|
||||
full = '$date, $time';
|
||||
}
|
||||
final style =
|
||||
|
||||
@@ -11,3 +11,5 @@ Checks: bounded analysis clean; 586 transcript/conversation tests passed through
|
||||
Real Chrome full-app fixture screenshots inspected: `/private/tmp/timestamps-wide-final/01-timestamp.png` (1100x1000 light), `/private/tmp/timestamps-narrow-final/01-timestamp.png` (560x1000 dark), and `/private/tmp/timestamps-cupertino-final/01-timestamp.png` (560x1000 Cupertino light). Fixture uses opt-in `timestamps=1`; no production sessions touched. Capture tools exited normally. No physical device or Safari verification.
|
||||
|
||||
Published web and Android from source commit `9180e841`. APK build `29898600`, matching previous release signing certificate. Web JS SHA256 `49681884de1be41e59bc1c47d9f174bfc8f9e5b3a88d7545ee7dc11c5a2b374a`; APK SHA256 `b998322320394e506126dc409192ac51e35d160e2f6d751a1fcc70f44889906f`. Authenticated local HTTP downloads of JS/feed/APK matched; public HTTPS JS/feed verified. Web rollback: `app-web.before-web-update-1793916032086548000`; APK rollback: `app-updates.before-client-update-1793916075676166000`, both under the installation lib directory. No backend restart or device installation.
|
||||
|
||||
Date format follow-up: use day-first written months and 24-hour time (`5 November 2026 · 09:18`) on Material and Cupertino, including tooltip/semantics. Focused 25 tests pass and analysis is clean. Inspected narrow dark Material and light Cupertino screenshots at `/private/tmp/dayfirst-material/01-dates.png` and `/private/tmp/dayfirst-cupertino/01-dates.png`; no overflow.
|
||||
|
||||
@@ -165,7 +165,7 @@ void main() {
|
||||
final local = DateTime.utc(2026, 10, 20, 8, 12).toLocal();
|
||||
final l10n = MaterialLocalizations.of(context);
|
||||
final expected =
|
||||
'${l10n.formatCompactDate(local)} · ${l10n.formatTimeOfDay(TimeOfDay.fromDateTime(local), alwaysUse24HourFormat: MediaQuery.alwaysUse24HourFormatOf(context))}';
|
||||
'${local.day} ${l10n.formatMonthYear(local)} · ${l10n.formatTimeOfDay(TimeOfDay.fromDateTime(local), alwaysUse24HourFormat: true)}';
|
||||
expect(find.text(expected), findsOneWidget);
|
||||
|
||||
final copy = tester.widget<ChatCopyButton>(find.byType(ChatCopyButton));
|
||||
|
||||
Reference in New Issue
Block a user