Skip to content
This repository
Browse code

Fixed incorrect month labels in payment calendar view

  • Loading branch information...
commit a077ba3dc735fb6a5fbf0844545339db08796c95 1 parent aabaa7c
Ole Zorn authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  Classes/YearView.m
3  Classes/YearView.m
@@ -60,6 +60,7 @@ - (void)drawRect:(CGRect)rect
60 60 [monthFormatter setDateFormat:@"MMMM"];
61 61 [monthFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
62 62 NSCalendar *calendar = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease];
  63 + [calendar setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
63 64 NSDateComponents *currentDateComponents = [calendar components:NSYearCalendarUnit | NSMonthCalendarUnit fromDate:[NSDate date]];
64 65 NSInteger currentYear = [currentDateComponents year];
65 66 NSInteger currentMonth = [currentDateComponents month];
@@ -78,7 +79,7 @@ - (void)drawRect:(CGRect)rect
78 79 [[UIColor darkGrayColor] set];
79 80 }
80 81 NSDateComponents *monthComponents = [[[NSDateComponents alloc] init] autorelease];
81   - [monthComponents setMonth:i+1];
  82 + [monthComponents setMonth:i + 1];
82 83 NSDate *monthDate = [calendar dateFromComponents:monthComponents];
83 84 NSString *month = [monthFormatter stringFromDate:monthDate];
84 85

0 comments on commit a077ba3

Please sign in to comment.
Something went wrong with that request. Please try again.