pDateToString static method
Converts a DateTime object to a formatted date string.
Implementation
static String pDateToString(DateTime? dateTime,
{String? defaultValue, String? localization}) {
if (dateTime == null) return defaultValue ?? '';
try {
return pDateFormatter(localization: localization).format(dateTime);
} catch (e) {
if (kDebugMode) print('pDateToString error: $e');
return defaultValue ?? '00-00-0000';
}
}