import 'package:flutter/widgets.dart';

import 'package:pweb/utils/report/format.dart';


String formatCompletedAt(BuildContext context, DateTime? completedAt) {
  final value = meaningfulDate(completedAt);
  return formatDateLabel(context, value);
}

DateTime? meaningfulDate(DateTime? value) {
  if (value == null) return null;
  if (value.year <= 1) return null;
  return value;
}
