mail-archives/mono-bugs/2004-June/018188.html

123 строки
4.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 60912][Nor] Changed - DateTime.Parse() does not support pattern &quot;6/28/2004 12:00:00 AM&quot;
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="018187.html">
<LINK REL="Next" HREF="018189.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 60912][Nor] Changed - DateTime.Parse() does not support pattern &quot;6/28/2004 12:00:00 AM&quot;
</H1>
<B>bugzilla-daemon@bugzilla.ximian.com
</B>
<A HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com"
TITLE="[Mono-bugs] [Bug 60912][Nor] Changed - DateTime.Parse() does not support pattern &quot;6/28/2004 12:00:00 AM&quot;">bugzilla-daemon@bugzilla.ximian.com
</A><BR>
<I>Wed, 30 Jun 2004 00:32:14 -0400 (EDT)</I>
<P><UL>
<LI> Previous message: <A HREF="018187.html">[Mono-bugs] [Bug 60908][Wis] Changed - [PATCH] Make OffsetToStringData an intrinsic
</A></li>
<LI> Next message: <A HREF="018189.html">[Mono-bugs] [Bug 60912][Nor] Changed - DateTime.Parse() does not support pattern &quot;6/28/2004 12:00:00 AM&quot;
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#18188">[ date ]</a>
<a href="thread.html#18188">[ thread ]</a>
<a href="subject.html#18188">[ subject ]</a>
<a href="author.html#18188">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 <A HREF="mailto:atsushi@ximian.com.">atsushi@ximian.com.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=60912">http://bugzilla.ximian.com/show_bug.cgi?id=60912</A>
--- shadow/60912 2004-06-29 21:05:24.000000000 -0400
+++ shadow/60912.tmp.10172 2004-06-30 00:32:14.000000000 -0400
@@ -2,13 +2,13 @@
Product: Mono: Class Libraries
Version: unspecified
OS: All
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: CORLIB
AssignedTo: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
ReportedBy: <A HREF="mailto:rshade@dvsconsulting.com">rshade@dvsconsulting.com</A>
QAContact: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
TargetMilestone: ---
@@ -19,6 +19,44 @@
DateTime.Parse() does not support pattern &quot;6/28/2004 12:00:00 AM&quot;
------- Additional Comments From <A HREF="mailto:rshade@dvsconsulting.com">rshade@dvsconsulting.com</A> 2004-06-29 21:05 -------
Created an attachment (id=8399)
TestCase
+
+------- Additional Comments From <A HREF="mailto:atsushi@ximian.com">atsushi@ximian.com</A> 2004-06-30 00:32 -------
+It is culture dependent and what we do not fully support right now.
+What is your culture? (CultureInfo.CurrentCulture)
+
+Below is the short program with which I always verify if the date
+string is universally parsable or not:
+
+using System;
+using System.Threading;
+using System.Globalization;
+class Test
+{
+ public static void Main (string [] rgszArgs)
+ {
+ for (int i = 0; i &lt; 32768; i++) {
+ CultureInfo ci;
+ try {
+ ci = new CultureInfo (i);
+ if (ci.IsNeutralCulture)
+ continue;
+ } catch (Exception) {
+ continue;
+ }
+ Thread.CurrentThread.CurrentCulture =&amp;#12288;ci;
+ DateTime dt;
+ try {
+ dt = DateTime.Parse (&quot;6/28/2004
+12:00:00 AM&quot;);
+ } catch (Exception ex) {
+ Console.WriteLine (&quot;culture&amp;#12288;{0} {1}
+failed: {2} {3} {4}&quot;, i, ci, ci.Calendar,
+ci.DateTimeFormat.PMDesignator, ex.Message);
+ }
+ }
+ }
+}
+
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="018187.html">[Mono-bugs] [Bug 60908][Wis] Changed - [PATCH] Make OffsetToStringData an intrinsic
</A></li>
<LI> Next message: <A HREF="018189.html">[Mono-bugs] [Bug 60912][Nor] Changed - DateTime.Parse() does not support pattern &quot;6/28/2004 12:00:00 AM&quot;
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#18188">[ date ]</a>
<a href="thread.html#18188">[ thread ]</a>
<a href="subject.html#18188">[ subject ]</a>
<a href="author.html#18188">[ author ]</a>
</LI>
</UL>
</body></html>