mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-05 05:18:51 +00:00
see ChangeLog
Monotone-Revision: 9054022ef1ca8aeba6e34842d27d9b94ce002b89 Monotone-Author: dev-unix.inverse.qc.ca Monotone-Date: 2006-06-15T19:34:10 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
46
UI/Scheduler/UIxCalWeekView.m
Normal file
46
UI/Scheduler/UIxCalWeekView.m
Normal file
@@ -0,0 +1,46 @@
|
||||
// $Id: UIxCalWeekView.m 303 2004-09-10 15:23:10Z znek $
|
||||
|
||||
#include "UIxCalWeekView.h"
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxCalWeekView
|
||||
|
||||
- (NSCalendarDate *)startDate {
|
||||
return [[[super startDate] mondayOfWeek] beginOfDay];
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)endDate {
|
||||
unsigned offset;
|
||||
|
||||
if([self shouldDisplayWeekend])
|
||||
offset = 7;
|
||||
else
|
||||
offset = 5;
|
||||
return [[[self startDate] dateByAddingYears:0 months:0 days:offset
|
||||
hours:0 minutes:0 seconds:0]
|
||||
endOfDay];
|
||||
}
|
||||
|
||||
- (NSArray *)appointments {
|
||||
return [self fetchCoreInfos];
|
||||
}
|
||||
|
||||
/* URLs */
|
||||
|
||||
- (NSDictionary *)prevWeekQueryParameters {
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[self startDate] dateByAddingYears:0 months:0 days:-7
|
||||
hours:0 minutes:0 seconds:0];
|
||||
return [self queryParametersBySettingSelectedDate:date];
|
||||
}
|
||||
|
||||
- (NSDictionary *)nextWeekQueryParameters {
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[self startDate] dateByAddingYears:0 months:0 days:7
|
||||
hours:0 minutes:0 seconds:0];
|
||||
return [self queryParametersBySettingSelectedDate:date];
|
||||
}
|
||||
|
||||
@end /* UIxCalWeekView */
|
||||
Reference in New Issue
Block a user