We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 313d25f commit cf7ccfaCopy full SHA for cf7ccfa
src/Exceptionless.DateTimeExtensions/TimeUnit.cs
@@ -28,15 +28,13 @@ public static bool TryParse(string value, out TimeSpan? time)
28
29
private static TimeSpan? ParseTime(string value)
30
{
31
- if (String.IsNullOrEmpty(value))
+ if (String.IsNullOrWhitespace(value))
32
return null;
33
34
string normalized = value.Trim();
35
- if (String.IsNullOrEmpty(normalized))
36
- return null;
37
38
- // bail if we have any weird characters
39
- foreach (char c in value)
+// bail if we have any weird characters
+foreach (char c in normalized)
40
if (!Char.IsLetterOrDigit(c) && c != '-' && c != '+' && !Char.IsWhiteSpace(c))
41
42
0 commit comments