Monotone-Parent: ebe63ce53628359dd83606f2bb756f112a053f66

Monotone-Revision: 49a09455a4649cc47dfc143047a9635ce2974e57

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-02-11T19:48:09
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-02-11 19:48:09 +00:00
parent d8a541ab8d
commit dab684f8aa
6 changed files with 608 additions and 193 deletions

View File

@@ -67,20 +67,34 @@
tz = [ud timeZone];
start = [event startDate];
[start setTimeZone: tz];
newStart = [start dateByAddingYears: 0 months: 0
days: [daysDelta intValue]
hours: 0 minutes: [startDelta intValue]
seconds: 0];
end = [event endDate];
[end setTimeZone: tz];
newDuration = ([end timeIntervalSinceDate: start]
+ [durationDelta intValue] * 60);
newEnd = [newStart addTimeInterval: newDuration];
if ([event isAllDay])
{
newStart = [start dateByAddingYears: 0 months: 0
days: [daysDelta intValue]
hours: 0 minutes: 0
seconds: 0];
newDuration = (((float) abs ([end timeIntervalSinceDate: start])
+ [durationDelta intValue] * 60)
/ 86400);
[event setAllDayWithStartDate: newStart duration: newDuration];
}
else
{
newStart = [start dateByAddingYears: 0 months: 0
days: [daysDelta intValue]
hours: 0 minutes: [startDelta intValue]
seconds: 0];
[event setStartDate: newStart];
[event setEndDate: newEnd];
newDuration = ([end timeIntervalSinceDate: start]
+ [durationDelta intValue] * 60);
newEnd = [newStart addTimeInterval: newDuration];
[event setStartDate: newStart];
[event setEndDate: newEnd];
}
[co saveComponent: event];
response = [self responseWith204];