[Mono-bugs] [Bug 81548][Wis] New - DateTime.TryParseExact throws System.FormatException.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon May 7 08:32:50 EDT 2007
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 vlad.dimitrov at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=81548
--- shadow/81548 2007-05-07 08:32:50.000000000 -0400
+++ shadow/81548.tmp.28519 2007-05-07 08:32:50.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 81548
+Product: Mono: Class Libraries
+Version: 1.0
+OS: GNU/Linux [Other]
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: vlad.dimitrov at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: DateTime.TryParseExact throws System.FormatException.
+
+Description of Problem:
+DateTime.TryParseExact does not work properly. MS .NET parses the string
+correctly. While Mono throws exception. The localization is English.
+
+using System;
+using System.Globalization;
+
+namespace TryFormatEaxctTest
+{
+ class Program
+ {
+ static void Main (string [] args)
+ {
+ DateTime date;
+
+ // Both lines below throw
+ // System.FormatException with message "String was not
+recognized as valid DateTime because the day of week was incorrect."
+
+ DateTime.TryParseExact ("Mon.05.07", "ddd.MM.yy", null,
+DateTimeStyles.None, out date);
+ DateTime.TryParseExact ("Monday.05.07", "dddd.MM.yy", null,
+DateTimeStyles.None, out date);
+ }
+ }
+}
+
+Actual Results:
+ Throws an exception.
+
+Expected Results:
+ To parse the sring properly
+
+How often does this happen?
+ Always
More information about the mono-bugs
mailing list