Skip to content

Commit

Permalink
Always display month in week view
Browse files Browse the repository at this point in the history
Fixes #3724
  • Loading branch information
cgx committed Jun 10, 2016
1 parent 684c32e commit 6c2052a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
3 changes: 3 additions & 0 deletions NEWS
@@ -1,6 +1,9 @@
3.1.3 (2016-MM-DD)
------------------

Enhancements
- [web] always display name of month in week view (#3724)

Bug fixes
- [web] fixed generic avatar in lists (#3719)
- [web] fixed validation in Sieve filter editor
Expand Down
24 changes: 6 additions & 18 deletions UI/Scheduler/UIxCalDayTable.m
Expand Up @@ -312,35 +312,23 @@ - (NSString *) labelForDay

- (NSString *) labelForMonth
{
NSCalendarDate *nextDay;
NSString *calendarFormat;
BOOL isLastOrFirstDay;
BOOL isFirstDay;

isLastOrFirstDay = NO;
isFirstDay = NO;
calendarFormat = @"%b";

if ([currentView hasSuffix: @"dayview"])
{
isLastOrFirstDay = YES;
isFirstDay = YES;
calendarFormat = @"%B";
}
else
else if ([currentTableDay dayOfMonth] == 1 || [daysToDisplay indexOfObject: currentTableDay] == 0)
{
if ([currentTableDay dayOfMonth] == 1)
{
isLastOrFirstDay = YES;
}
else if ([currentTableDay dayOfMonth] > 27)
{
nextDay = [currentTableDay dateByAddingYears: 0
months: 0
days: 1];
if ([nextDay dayOfMonth] == 1)
isLastOrFirstDay = YES;
}
isFirstDay = YES;
}

return isLastOrFirstDay? [currentTableDay descriptionWithCalendarFormat: calendarFormat locale: locale] : nil;
return isFirstDay? [currentTableDay descriptionWithCalendarFormat: calendarFormat locale: locale] : nil;
}

- (NSString *) labelForDate
Expand Down

0 comments on commit 6c2052a

Please sign in to comment.