import 'package:intl/intl.dart';

extension StringExtension on String {
  String toFormattedNewsDate() {
    final parsedDate = DateTime.parse(this);

    // The intl package is used here for more robust formatting options
    final DateFormat formatter = DateFormat('dd.MM.yyyy HH:mm', 'de_DE');
    return "Stand: ${formatter.format(parsedDate)} Uhr";
  }
}
