Monotone-Parent: 2d120d90819b42e21a50956a14c0c5d130cfdf09 Monotone-Revision: 376221b991f7b0bee18cfede79614398e85e5b99 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-31T18:52:52 Monotone-Branch: ca.inverse.sogo
46 lines
1.1 KiB
Objective-C
46 lines
1.1 KiB
Objective-C
// $Id: UIxCalMonthView.m 191 2004-08-12 16:28:32Z helge $
|
|
|
|
#include <SOGo/NSCalendarDate+SOGo.h>
|
|
#include "UIxCalMonthView.h"
|
|
#include "common.h"
|
|
|
|
@implementation UIxCalMonthView
|
|
|
|
- (NSCalendarDate *)startOfMonth {
|
|
return [[[super startDate] firstDayOfMonth] beginOfDay];
|
|
}
|
|
|
|
- (NSCalendarDate *)startDate {
|
|
return [[self startOfMonth] mondayOfWeek];
|
|
}
|
|
|
|
- (NSCalendarDate *)endDate {
|
|
NSCalendarDate *date;
|
|
|
|
date = [self startOfMonth];
|
|
date = [date dateByAddingYears:0 months:0 days:[date numberOfDaysInMonth]
|
|
hours:0 minutes:0 seconds:0];
|
|
date = [[date sundayOfWeek] endOfDay];
|
|
return date;
|
|
}
|
|
|
|
/* URLs */
|
|
|
|
- (NSDictionary *)prevMonthQueryParameters {
|
|
NSCalendarDate *date;
|
|
|
|
date = [[self startOfMonth] dateByAddingYears:0 months:-1 days:0
|
|
hours:0 minutes:0 seconds:0];
|
|
return [self queryParametersBySettingSelectedDate:date];
|
|
}
|
|
|
|
- (NSDictionary *)nextMonthQueryParameters {
|
|
NSCalendarDate *date;
|
|
|
|
date = [[self startOfMonth] dateByAddingYears:0 months:1 days:0
|
|
hours:0 minutes:0 seconds:0];
|
|
return [self queryParametersBySettingSelectedDate:date];
|
|
}
|
|
|
|
@end /* UIxCalMonthView */
|