[Mono-bugs] [Bug 41845][Nor] Changed - Converting date string with large year doesn't throw correct exception

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 23 Jun 2004 14:04:20 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=41845

--- shadow/41845	2004-04-25 10:33:38.000000000 -0400
+++ shadow/41845.tmp.15224	2004-06-23 14:04:20.000000000 -0400
@@ -93,6 +93,13 @@
  					//if (num_parsed < s.Length && Char.IsDigit(s[num_parsed]) ||
 (year != 0 && (year < 1 || year > 9999)))
 
 ------- Additional Comments From ndrochak@gol.com  2004-04-25 10:33 -------
 Unit tests are showing this throwing a FormatException instead of the
 correct one: ArgumentOutOfRangeException
+
+------- Additional Comments From sebastien@ximian.com  2004-06-23 14:04 -------
+This patch tracks a "long year" when parsing the multiple formats,
+then before throwing a FormatException (i.e. no format could match the
+date) we check if we are in the possible presence of a long year. If
+so we throw an ArgumentOutOfRangeException.
+