(Adapted from
http://stackoverflow.com/questions/23964736/issue-parsing-nodatime-localdate-fro
m-standard-pattern)
Find the bug in the following:
var pattern = LocalDatePattern.CreateWithInvariantCulture("D");
var parseResult = pattern.Parse("Monday, May 26 2014");
var localDate = parseResult.GetValueOrThrow();
Console.WriteLine("Parsed value is {0}.", localDate);
The error is:
NodaTime.Text.UnparsableValueException: The value string does not match the
required number from the format string "dd".
It would be really much more useful if the message explained what the string
(or at least, string position) was at the point it was trying to find a "dd".
(Tentatively scheduling for 1.3 pending discussion, but if this isn't trivial,
will punt to later.)
Original issue reported on code.google.com by
malcolm.roweon 31 May 2014 at 9:27