Skip to content

Commit 37e8e47

Browse files
committed
Fix missmatched transaction date time conversion
1 parent 7c3822d commit 37e8e47

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/core/extensions/string_extension.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ extension CustomDateParsing on String {
7070
/// - "Yesterday, 11.33" or "Yesterday"
7171
/// - "Tomorrow, 11.33" or "Tomorrow"
7272
DateTime toDateTimeFromDayMonthYearTime12Hour() {
73-
final standardFormat = DateFormat("d MMMM yyyy hh.mm a");
73+
final standardFormat = DateFormat("d MMMM yyyy, hh.mm a");
7474
final timeOnlyFormat = DateFormat("hh.mm a");
7575

7676
// Split by comma to separate date and time parts

lib/features/transaction/presentation/riverpod/transaction_form_state.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,9 @@ TransactionFormState useTransactionFormState({
317317
}
318318
// categoryController.text is handled by another useEffect based on selectedCategory
319319

320-
dateFieldController.text = transaction.date
321-
.toDayMonthYearTime12Hour();
320+
dateFieldController.text = transaction.date.toRelativeDayFormatted(
321+
showTime: true,
322+
);
322323

323324
final imagePath = transaction.imagePath;
324325
if (imagePath != null && imagePath.isNotEmpty) {

0 commit comments

Comments
 (0)