[Mono-bugs] [Bug 52274][Maj] New - DateTime doesn't parse formats "--MM--", "---dd", and "--MM-dd"

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 16 Dec 2003 19:52:25 -0500 (EST)


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 dave-mono@earth.li.

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

--- shadow/52274	2003-12-16 19:52:25.000000000 -0500
+++ shadow/52274.tmp.8373	2003-12-16 19:52:25.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 52274
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dave-mono@earth.li               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DateTime doesn't parse formats "--MM--", "---dd", and "--MM-dd"
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+System.DateTime.ParseExact doesn't like formats like "--MM--", "---dd", and
+"--MM-dd".
+
+This works on MS .NET, and is needed for Xml Schema datatypes gMonth, gDay
+and gMonthDay
+
+Steps to reproduce the problem:
+1. Compile attached test.cs
+2. Run it
+
+Actual Results:
+$ mono test.exe
+
+Unhandled Exception: System.FormatException: Invalid format
+in <0x0013d> System.DateTime:ParseExact
+(string,string[],System.IFormatProvider,System.Globalization.DateTimeStyles)
+in <0x0004c> System.DateTime:ParseExact
+(string,string,System.IFormatProvider,System.Globalization.DateTimeStyles)
+in <0x0001c> System.DateTime:ParseExact (string,string,System.IFormatProvider)
+in <0x0002b> .XMLSchemaExamples:Main ()
+
+
+Expected Results:
+$ ./test.exe                                                              
+                  
+12
+24
+12
+24
+
+
+How often does this happen? 
+All the time
+
+Additional Information: