Monotone-Parent: d9a69894dba4cd1b601ba9795b1c0a7b03a477c1

Monotone-Revision: 9ca5fa1849f6316f47f2cf976b80f00e5ff0fc76

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-19T19:42:25
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-06-19 19:42:25 +00:00
parent 1c9840682b
commit c1fdbcfe1a
2 changed files with 25 additions and 13 deletions

View File

@ -44,6 +44,9 @@
NSArray *daysToDisplay;
NSCalendarDate *currentTableDay;
NSArray *currentTableColumn;
NSArray *dayNames;
NSArray *monthNames;
}
- (NSDictionary *) monthBeforePrevMonthQueryParameters;

View File

@ -36,13 +36,20 @@
- (id) init
{
NSDictionary *locale;
if ((self = [super init]))
{
monthAptFormatter
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: timeZone];
[monthAptFormatter setShortMonthTitleOnly];
dateFormatter = [[SOGoDateFormatter alloc]
initWithLocale: [self locale]];
// monthAptFormatter
// = [[SOGoAptFormatter alloc] initWithDisplayTimeZone: timeZone];
// [monthAptFormatter setShortMonthTitleOnly];
// dateFormatter = [[SOGoDateFormatter alloc]
// initWithLocale: [self locale]];
locale = [context valueForKey: @"locale"];
dayNames = [locale objectForKey: NSWeekDayNameArray];
[dayNames retain];
monthNames = [locale objectForKey: NSMonthNameArray];
[monthNames retain];
sortedAppointments = [NSMutableDictionary new];
daysToDisplay = nil;
}
@ -50,16 +57,18 @@
return self;
}
- (SOGoAptFormatter *) monthAptFormatter
{
return monthAptFormatter;
}
// - (SOGoAptFormatter *) monthAptFormatter
// {
// return monthAptFormatter;
// }
- (void) dealloc
{
[monthNames release];
[dayNames release];
[daysToDisplay release];
[monthAptFormatter release];
[dateFormatter release];
// [monthAptFormatter release];
// [dateFormatter release];
[sortedAppointments release];
[super dealloc];
}
@ -111,7 +120,7 @@
- (NSString *) labelForCurrentDayToDisplay
{
return [dateFormatter fullDayOfWeek: [currentTableDay dayOfWeek]];
return [dayNames objectAtIndex: [currentTableDay dayOfWeek]];
}
- (NSDictionary *) _dateQueryParametersWithOffset: (int) monthsOffset
@ -211,7 +220,7 @@
|| [currentTableDay isDateOnSameDay: lastDayOfMonth])
{
monthOfYear
= [dateFormatter shortMonthOfYear: [currentTableDay monthOfYear]];
= [monthNames objectAtIndex: [currentTableDay monthOfYear]];
label = [NSString stringWithFormat: @"%d %@", dayOfMonth, monthOfYear];
}
else