Refactor TryParseDate to reduce complexity

- Replacing the multidude of if statements with a for loop reduced the
  cyclomatic complexity of the function reported by Visual Studio's code metric
  from 16 to 13 and increased maintainability from 52 to 55.