From 1360340318ae7d8aaabf870bab857a0e933d1965 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 12 Jan 2007 23:21:13 +0000 Subject: [PATCH] Monotone-Parent: b035c2825534d38c8e7a14fd3abcf362bcbf2888 Monotone-Revision: 4e859b939657af37f61800fad0e1fdfca1943077 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-01-12T23:21:13 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/Appointments/SOGoFreeBusyObject.m | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b20db642..4cf81ee3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-12 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoFreeBusyObject.m ([SOGoFreeBusyObject + -contentAsString]): the default timerange is now 14 days before + currentday and 1 month after. + 2007-01-08 Wolfgang Sourdeau * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index 1704686ab..d995841a6 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -46,11 +46,15 @@ - (NSString *) contentAsString { - NSCalendarDate *startDate, *endDate; + NSCalendarDate *today, *startDate, *endDate; - startDate = [[[NSCalendarDate calendarDate] mondayOfWeek] beginOfDay]; - endDate = [startDate dateByAddingYears: 0 months: 0 days: 7 - hours: 23 minutes: 59 seconds: 59]; + today = [[NSCalendarDate calendarDate] beginOfDay]; + [today setTimeZone: [self userTimeZone]]; + + startDate = [today dateByAddingYears: 0 months: 0 days: -14 + hours: 0 minutes: 0 seconds: 0]; + endDate = [startDate dateByAddingYears: 0 months: 1 days: 0 + hours: 0 minutes: 0 seconds: 0]; return [self contentAsStringFrom: startDate to: endDate]; }