mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 03:15:25 +00:00
Mantis 1911: Added support for shor time format in calendar view
Monotone-Parent: 3cb43f8e60e5dd474976b8e32f28cbb097744a16 Monotone-Revision: 9a9029239df8b59ccf4609e50402e80e31085154 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-08-25T15:05:01 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -119,6 +119,12 @@
|
||||
- (NSArray *) hoursToDisplay
|
||||
{
|
||||
unsigned int currentHour, lastHour;
|
||||
|
||||
// For later
|
||||
ud = [[context activeUser] userDefaults];
|
||||
timeFormat = [NSMutableString stringWithString: [ud stringForKey: @"TimeFormat"]];
|
||||
if (!timeFormat || [timeFormat length] == 0)
|
||||
timeFormat = [NSMutableString stringWithString: @"%H:00"];
|
||||
|
||||
if (!hoursToDisplay)
|
||||
{
|
||||
@@ -178,7 +184,19 @@
|
||||
|
||||
- (NSString *) currentTableHour
|
||||
{
|
||||
return currentTableHour;
|
||||
int hour;
|
||||
NSCalendarDate *tmp;
|
||||
NSString *formatted = currentTableHour, *parse;
|
||||
|
||||
hour = [currentTableHour intValue];
|
||||
parse = [NSString stringWithFormat: @"2000-01-01 %02d:00", hour];
|
||||
|
||||
tmp = [NSCalendarDate dateWithString: parse
|
||||
calendarFormat: @"%Y-%m-%d %H:%M"];
|
||||
if (tmp)
|
||||
formatted = [tmp descriptionWithCalendarFormat: timeFormat];
|
||||
|
||||
return formatted;
|
||||
}
|
||||
|
||||
- (NSString *) currentAppointmentHour
|
||||
|
||||
Reference in New Issue
Block a user