Skip to content

Commit

Permalink
refactor: Update date format in activity log #2927
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Oct 4, 2024
1 parent 922f81f commit ec266d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/app/shared/date/date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ class UiDate {
return outputFormat.format(dateTime);
}

static String formatDatetime(DateTime dateTime) {
final date = '${dateTime.year}.${dateTime.month}.${dateTime.day}';
final time = '${dateTime.hour}:${dateTime.minute}';

return '$date $time';
}

static String? formatTime(String formattedString) {
try {
final DateTime dt =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class _ActivityLogViewState extends State<ActivityLogView> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
logData.timestamp.toString(),
UiDate.formatDatetime(logData.timestamp),
style: TextStyle(
color: colorScheme.onSurface,
fontSize: 12,
Expand Down

0 comments on commit ec266d8

Please sign in to comment.