title: Objective-C Expected Identifier - simple syntax debugging problem
body: <p>I need help debugging this error <code>Expected Identifier</code>. The code is -</p>
  
  <pre><code>+(NSString *)dayOfWeek {
      NSDate *day = [NSDate date];
      NSCalendar *calendar = [NSCalendar currentCalendar];
      NSDateComponents *components = [calendar components:NSWeekdayCalendarUnit fromDate:day];
      day = [calendar dateFromComponents:components];
      NSLog(@"The DAY OF THE WEEK is -- %@", day);
      NSArray *daysOfTheWeek = [NSArray arrayWithObjects:@"Sunday", @"Monday", @"Tuesday", @"Wednesday", @"Thursday", @"Friday", @"Saturday", nil];
  
      NSString *dayName = [[[NSString alloc] initWithFormat:[daysOfTheWeek objectAtIndex:[[components weekday]-1]]]];
      return dayName;
  }
  </code></pre>
  
  <p>I get the error marker at <code>-1]</code>, underneath the <code>]</code>.</p>