[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
Sat, 10 Jan 2004 06:57:46 -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 2004-01-10 06:57:46.000000000 -0500
+++ shadow/52274.tmp.28773 2004-01-10 06:57:46.000000000 -0500
@@ -0,0 +1,67 @@
+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:
+
+------- Additional Comments From dave-mono@earth.li 2003-12-16 19:53 -------
+Created an attachment (id=6265)
+Example file showing this problem
+
+
+------- Additional Comments From dave-mono@earth.li 2004-01-10 06:57 -------
+Created an attachment (id=6379)
+Patch to fix it
+