mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-07 20:45:28 +00:00
Monotone-Parent: 886f71d2861cb6d59b81ebbddad0f7edee83e3c7
Monotone-Revision: 8e3ccd6bdd643adbebe091bde0df46f1f37150f4 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-01-07T18:32:24 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -310,13 +310,16 @@
|
||||
if (untilDate)
|
||||
{
|
||||
// The until date must match the time of the start date
|
||||
untilDate = [untilDate initWithYear: [untilDate yearOfCommonEra]
|
||||
month: [untilDate monthOfYear]
|
||||
day: [untilDate dayOfMonth]
|
||||
hour: [[event startDate] hourOfDay]
|
||||
minute: [[event startDate] minuteOfHour]
|
||||
second: 0
|
||||
timeZone: [untilDate timeZone]];
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[event startDate] copy];
|
||||
[date setTimeZone: [[context activeUser] timeZone]];
|
||||
untilDate = [untilDate dateByAddingYears:0
|
||||
months:0
|
||||
days:0
|
||||
hours:[date hourOfDay]
|
||||
minutes:[date minuteOfHour]
|
||||
seconds:0];
|
||||
[rule setUntilDate: untilDate];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#import <NGCards/NSCalendarDate+NGCards.h>
|
||||
#import <NGObjWeb/SoSecurityManager.h>
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/WOApplication.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
@@ -340,8 +341,12 @@ iRANGE(2);
|
||||
}
|
||||
else if ([rule untilDate])
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[rule untilDate] copy];
|
||||
[date setTimeZone: [[context activeUser] timeZone]];
|
||||
[self setRange1: @"2"];
|
||||
[self setRange2: [[rule untilDate] descriptionWithCalendarFormat: @"%Y-%m-%d"]];
|
||||
[self setRange2: [date descriptionWithCalendarFormat: @"%Y-%m-%d"]];
|
||||
}
|
||||
else
|
||||
[self setRange1: @"0"];
|
||||
@@ -1387,8 +1392,14 @@ RANGE(2);
|
||||
// Repeat until date
|
||||
else if (range == 2)
|
||||
{
|
||||
[theRule setUntilDate: [NSCalendarDate dateWithString: [self range2]
|
||||
calendarFormat: @"%Y-%m-%d"]];
|
||||
NSCalendarDate *date;
|
||||
SOGoUser *user;
|
||||
|
||||
user = [context activeUser];
|
||||
date = [NSCalendarDate dateWithString: [self range2]
|
||||
calendarFormat: @"%Y-%m-%d"
|
||||
locale: [[WOApplication application] localeForLanguageNamed: [user language]]];
|
||||
[theRule setUntilDate: date];
|
||||
}
|
||||
// No end date.
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user