+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
{
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"];
- (NSString *) tzId;
- (NSString *) dateTimeStringForDate: (NSCalendarDate *) date;
+- (NSString *) dateStringForDate: (NSCalendarDate *) date;
- (NSCalendarDate *) dateForDateTimeString: (NSString *) string;
@end
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