]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1082 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 13 Jun 2007 02:34:44 +0000 (02:34 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 13 Jun 2007 02:34:44 +0000 (02:34 +0000)
SOPE/NGCards/ChangeLog
SOPE/NGCards/iCalDateTime.m
SOPE/NGCards/iCalTimeZone.h
SOPE/NGCards/iCalTimeZone.m

index fa1265156222769c03a18575508e454193cdbf67..0c04752c43e3d855327068a31c41c2468a548952 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-12  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * iCalDateTime.m ([iCalDateTime
+       -_setDateTime:dateTimeforAllDayEntity:forAllDayEntity]): take the
+       forAllDayEntity parameter into account when the date entity has a
+       timezone.
+
+       * iCalTimeZone.m ([iCalTimeZone -dateStringForDate:date]): new
+       method that returns dates formatted for all day events.
+
 2007-06-07  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * iCalDateTime.m ([iCalDateTime
index fc707b32fa62a1e155c799ed2f9ca125b4cb452a..127be961a6a9c383605501c372091e6a22ee6224 100644 (file)
     {
       tz = [self timeZone];
       if (tz)
-        timeString = [tz dateTimeStringForDate: dateTime];
+       {
+         if (forAllDayEntity)
+           timeString = [tz dateStringForDate: dateTime];
+         else
+           timeString = [tz dateTimeStringForDate: dateTime];
+       }
       else
         {
           utcTZ = [NSTimeZone timeZoneWithName: @"GMT"];
index ba6211847b9028500f7fb6f2360b26af5f06bee2..10ce4db6de1ed2c1c609035022b35ed072c7a8df 100644 (file)
@@ -32,6 +32,7 @@
 
 - (NSString *) tzId;
 - (NSString *) dateTimeStringForDate: (NSCalendarDate *) date;
+- (NSString *) dateStringForDate: (NSCalendarDate *) date;
 - (NSCalendarDate *) dateForDateTimeString: (NSString *) string;
 
 @end
index 1de139fb68e1ebe54c4a02785e1ee9f6dc92b91a..0e2e56be4b9eedf48fe3200090515b2e207aaf55 100644 (file)
   return period;
 }
 
-- (NSString *) dateTimeStringForDate: (NSCalendarDate *) date
+- (NSCalendarDate *) _computedDateTimeForDate: (NSCalendarDate *) date
 {
   NSCalendarDate *tmpDate;
   NSTimeZone *utc;
   tmpDate = [date copy];
   [tmpDate autorelease];
   [tmpDate setTimeZone: utc];
-  tmpDate
-    = [tmpDate addYear: 0 month: 0 day: 0
-               hour: 0 minute: 0
-               second: [[self periodForDate: date] secondsOffsetFromGMT]];
 
-  return [tmpDate iCalFormattedDateTimeString];
+  return [tmpDate addYear: 0 month: 0 day: 0
+                 hour: 0 minute: 0
+                 second: [[self periodForDate: date] secondsOffsetFromGMT]];
+}
+
+- (NSString *) dateTimeStringForDate: (NSCalendarDate *) date
+{
+  return [[self _computedDateTimeForDate: date]
+          iCalFormattedDateTimeString];
+}
+
+- (NSString *) dateStringForDate: (NSCalendarDate *) date
+{
+  return [[self _computedDateTimeForDate: date]
+          iCalFormattedDateString];
 }
 
 - (NSCalendarDate *) dateForDateTimeString: (NSString *) string