diff --git a/UI/Scheduler/UIxCalDayTable.h b/UI/Scheduler/UIxCalDayTable.h index 9dd82ec70..ac1df6fed 100644 --- a/UI/Scheduler/UIxCalDayTable.h +++ b/UI/Scheduler/UIxCalDayTable.h @@ -37,7 +37,8 @@ { SOGoDateFormatter *dateFormatter; NSArray *weekDays; - NSString *currentView, *timeFormat, *currentTableHour; + NSString *currentView, *timeFormat; + NSNumber *currentTableHour; NSCalendarDate *startDate, *currentTableDay; NSMutableArray *daysToDisplay, *calendarsToDisplay, *hoursToDisplay; NSMutableDictionary *currentCalendar; diff --git a/UI/Scheduler/UIxCalDayTable.m b/UI/Scheduler/UIxCalDayTable.m index 7c377b433..64d39a67d 100644 --- a/UI/Scheduler/UIxCalDayTable.m +++ b/UI/Scheduler/UIxCalDayTable.m @@ -255,16 +255,21 @@ return currentCalendar; } -- (void) setCurrentTableHour: (NSString *) aTableHour +- (void) setCurrentTableHour: (NSNumber *) aTableHour { - currentTableHour = aTableHour; + ASSIGN(currentTableHour, aTableHour); } -- (NSString *) currentTableHour +- (NSNumber *) currentTableHour +{ + return currentTableHour; +} + +- (NSString *) currentFormattedHour { int hour; NSCalendarDate *tmp; - NSString *formatted = currentTableHour, *parse; + NSString *formatted = [NSString stringWithFormat: @"%d", [currentTableHour intValue]], *parse; hour = [currentTableHour intValue]; parse = [NSString stringWithFormat: @"2000-01-01 %02d:00", hour]; @@ -272,7 +277,8 @@ tmp = [NSCalendarDate dateWithString: parse calendarFormat: @"%Y-%m-%d %H:%M"]; if (tmp) - formatted = [tmp descriptionWithCalendarFormat: timeFormat]; + formatted = [tmp descriptionWithCalendarFormat: timeFormat + locale: locale]; return formatted; } diff --git a/UI/Templates/SchedulerUI/UIxCalDayTable.wox b/UI/Templates/SchedulerUI/UIxCalDayTable.wox index dfe00c965..ee7a02d03 100644 --- a/UI/Templates/SchedulerUI/UIxCalDayTable.wox +++ b/UI/Templates/SchedulerUI/UIxCalDayTable.wox @@ -91,7 +91,7 @@