Bug 455610 Birthday fields for OS X address book incorrectly translated. r/sr=bienvenu
authorMark Banner <bugzilla@standard8.plus.com>
Wed, 17 Sep 2008 07:26:38 +0100
changeset 352 96c4692bd6b17eff55926f5a641f30f78bff1b84
parent 351 ad0d92b8cfa845af9e40caf40d8feeabe5862303
child 353 5e42e6537169dd3154c7a0f47bcbfde4314a51af
push idunknown
push userunknown
push dateunknown
bugs455610
Bug 455610 Birthday fields for OS X address book incorrectly translated. r/sr=bienvenu
mailnews/addrbook/src/nsAbOSXCard.mm
--- a/mailnews/addrbook/src/nsAbOSXCard.mm
+++ b/mailnews/addrbook/src/nsAbOSXCard.mm
@@ -135,19 +135,21 @@ MapDate(nsAbOSXCard *aCard, NSDate *aDat
         nsIAbManager *aAbManager)
 {
   // XXX Should we pass a format and timezone?
   NSCalendarDate *date = [aDate dateWithCalendarFormat:nil timeZone:nil];
   
   nsAutoString value;
   value.AppendInt([date yearOfCommonEra]);
   SetStringProperty(aCard, value, aYearPropName, aNotify, aAbManager);
+  value.Truncate();
   value.AppendInt([date monthOfYear]);
   SetStringProperty(aCard, value, aMonthPropName, aNotify, aAbManager);
-  value.AppendInt([date dayOfWeek]);
+  value.Truncate();
+  value.AppendInt([date dayOfMonth]);
   SetStringProperty(aCard, value, aDayPropName, aNotify, aAbManager);
 }
 
 static PRBool
 MapMultiValue(nsAbOSXCard *aCard, ABRecord *aOSXCard,
               const nsAbOSXPropertyMap &aMap, PRBool aNotify,
               nsIAbManager *aAbManager)
 {