Skip to content

Commit 27587dc

Browse files
committed
Update Utils.vb
MostRecentDate: Add default return on malformed date matching regex
1 parent 81589d8 commit 27587dc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

MWBot.net/Utils.vb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,9 @@ Namespace Utility
11711171
End Try
11721172
Next
11731173
dates.Sort()
1174+
If (dates.Count = 0) Then 'Match was found but malformed
1175+
Return New DateTime(9999, 12, 31, 23, 59, 59)
1176+
End If
11741177
Return dates.Last
11751178
End Function
11761179

0 commit comments

Comments
 (0)