[Mono-bugs] [Bug 81783][Nor] New - Calendar.AddMonths is off by one

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu May 31 05:09:14 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 rolfkvinge at ya.com.

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

--- shadow/81783	2007-05-31 05:09:14.000000000 -0400
+++ shadow/81783.tmp.9377	2007-05-31 05:09:14.000000000 -0400
@@ -0,0 +1,40 @@
+Bug#: 81783
+Product: Mono: Class Libraries
+Version: 1.0
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: rolfkvinge at ya.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Calendar.AddMonths is off by one
+
+Repro:
+
+using System;
+using System.Globalization;
+using System.Threading;
+
+class a {
+	static void Main () {
+		Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-
+US");
+		DateTime dt = DateTime.Parse("12/5/03");
+		Console.WriteLine 
+(Thread.CurrentThread.CurrentCulture.Calendar.AddMonths(dt, 6));
+	}
+}
+
+
+Mono prints:
+6/6/2004 12:00:00 AM
+
+MS prints: 
+6/5/2004 12:00:00 AM


More information about the mono-bugs mailing list