extractHeaderDateTimeValue function
Implementation
DateTime? extractHeaderDateTimeValue(Map<String, String> headers, String name,
{DateTime? Function(String)? parser}) {
final v = extractHeaderStringValue(headers, name);
if (v == null) {
return null;
}
if (parser != null) {
return parser(v);
}
return DateTime.tryParse(v) ?? _rfc822Parser.parseUtc(v);
}