mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 17:58:51 +00:00
Monotone-Parent: d9a69894dba4cd1b601ba9795b1c0a7b03a477c1
Monotone-Revision: 9ca5fa1849f6316f47f2cf976b80f00e5ff0fc76 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-19T19:42:25 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -44,6 +44,9 @@
|
||||
NSArray *daysToDisplay;
|
||||
NSCalendarDate *currentTableDay;
|
||||
NSArray *currentTableColumn;
|
||||
|
||||
NSArray *dayNames;
|
||||
NSArray *monthNames;
|
||||
}
|
||||
|
||||
- (NSDictionary *) monthBeforePrevMonthQueryParameters;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user