"yyyy/MMMM",
};
+ private static readonly string[] ExoticAndNonStandardFormats = new string[] {
+ "ddMMMyyyy"
+ };
+
private enum Which
{
Day,
if (ParseExact (s, dfi.GetAllDateTimePatternsInternal (), dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception))
return true;
+ if (ParseExact (s, ExoticAndNonStandardFormats, dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception))
+ return true;
+
if (!setExceptionOnError)
return false;
DateTime.Parse ("Sat,,, 01,,, Oct,,, ,,,1994 03:00:00", CultureInfo.InvariantCulture);
}
+ [Test]
+ public void TryParse_Bug11630 ()
+ {
+ DateTime parsed;
+
+ Assert.IsTrue (DateTime.TryParse ("10Feb2013", out parsed));
+ Assert.AreEqual (new DateTime (2013, 2, 10), parsed);
+ }
+
[Test]
[ExpectedException (typeof (FormatException))]
public void Parse_CommaAfterHours ()