Always display month in week view

Fixes #3724
pull/214/head
Francis Lachapelle 2016-06-10 14:06:41 -04:00
parent 684c32ee95
commit 6c2052ab6f
2 changed files with 9 additions and 18 deletions

3
NEWS
View File

@ -1,6 +1,9 @@
3.1.3 (2016-MM-DD) 3.1.3 (2016-MM-DD)
------------------ ------------------
Enhancements
- [web] always display name of month in week view (#3724)
Bug fixes Bug fixes
- [web] fixed generic avatar in lists (#3719) - [web] fixed generic avatar in lists (#3719)
- [web] fixed validation in Sieve filter editor - [web] fixed validation in Sieve filter editor

View File

@ -312,35 +312,23 @@
- (NSString *) labelForMonth - (NSString *) labelForMonth
{ {
NSCalendarDate *nextDay;
NSString *calendarFormat; NSString *calendarFormat;
BOOL isLastOrFirstDay; BOOL isFirstDay;
isLastOrFirstDay = NO; isFirstDay = NO;
calendarFormat = @"%b"; calendarFormat = @"%b";
if ([currentView hasSuffix: @"dayview"]) if ([currentView hasSuffix: @"dayview"])
{ {
isLastOrFirstDay = YES; isFirstDay = YES;
calendarFormat = @"%B"; calendarFormat = @"%B";
} }
else else if ([currentTableDay dayOfMonth] == 1 || [daysToDisplay indexOfObject: currentTableDay] == 0)
{ {
if ([currentTableDay dayOfMonth] == 1) isFirstDay = YES;
{
isLastOrFirstDay = YES;
}
else if ([currentTableDay dayOfMonth] > 27)
{
nextDay = [currentTableDay dateByAddingYears: 0
months: 0
days: 1];
if ([nextDay dayOfMonth] == 1)
isLastOrFirstDay = YES;
}
} }
return isLastOrFirstDay? [currentTableDay descriptionWithCalendarFormat: calendarFormat locale: locale] : nil; return isFirstDay? [currentTableDay descriptionWithCalendarFormat: calendarFormat locale: locale] : nil;
} }
- (NSString *) labelForDate - (NSString *) labelForDate