title: String to DateTime, TryParse was not enough
body: <p>Here's a method that works:    </p>
  
  <pre><code>        /// &lt;summary&gt;
          /// Checks date validity.
          /// &lt;/summary&gt;
          /// &lt;param name="candidate"&gt;String to check&lt;/param&gt;
          /// &lt;returns&gt;Whether valid and result as a date&lt;/returns&gt;
          private static Tuple&lt;bool, DateTime?&gt; ParseDate(string candidate)
          {
              DateTime result;
              if(DateTime.TryParseExact(candidate, "dd.MM.yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd.M.yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd.MM.yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "d.M.yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd/MM/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd/M/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd/MM/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "d/M/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd.MM.yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd.M.yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd.MM.yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "d.M.yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd/MM/yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd/M/yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "dd/MM/yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result) ||
                  DateTime.TryParseExact(candidate, "d/M/yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out result)
              )
              {
                  return new Tuple&lt;bool, DateTime?&gt;(true, result);
              }
  
              return new Tuple&lt;bool, DateTime?&gt;(false, null);
          }
  </code></pre>
  
  <p>Seems pretty useless to me to add tons of or-branches there. What would be a smarter way to do this? I thought DateTime.TryParse would do it, but it managed to somehow fail with 15.6.2020 (this past Monday) and return that it is not a valid date.</p>
  
  <p>And yeah, I have a million or-branches missing from there, I know. That's also a big problem here that I'd like help with.</p>