title: Obj-C - Get NSDate month component in word vs int?
body: <p>I'm using the below code to get the components of my NSDate, and it returns the following data:</p>
  <pre><code> &quot;&lt;NSDateComponents: 0x282564be0&gt; {\n    Calendar Year: 2020\n    Month: 10\n    Leap Month: 0\n    Day: 1&quot;,
      &quot;&lt;NSDateComponents: 0x282561120&gt; {\n    Calendar Year: 2020\n    Month: 10\n    Leap Month: 0\n    Day: 2&quot;,
      &quot;&lt;NSDateComponents: 0x282561180&gt; {\n    Calendar Year: 2020\n    Month: 10\n    Leap Month: 0\n    Day: 3&quot;,
      &quot;&lt;NSDateComponents: 0x2825611a0&gt; {\n    Calendar Year: 2020\n    Month: 10\n    Leap Month: 0\n    Day: 4&quot;,
      &quot;&lt;NSDateComponents: 0x282564bd0&gt; {\n    Calendar Year: 2020\n    Month: 10\n    Leap Month: 0\n    Day: 5&quot;,
      &quot;&lt;NSDateComponents: 0x282561310&gt; {\n    Calendar Year: 2020\n    Month: 10\n    Leap Month: 0\n    Day: 6&quot;,
      &quot;&lt;NSDateComponents: 0x282561530&gt; {\n    Calendar Year: 2020\n    Month: 10\n    Leap Month: 0\n    Day: 7&quot;
  </code></pre>
  <p>Is it possible to return the 'month' object as a three letter month instead of the actual month number? Eg. return October as 'Oct' instead of 10? I'm able to put the dateformatter on the dates returned to my array, but I'm not sure how I can also apply this to components?</p>
  <p><strong>ViewController.m</strong></p>
  <pre><code>       NSDate *today = [NSDate date];
         NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
         NSCalendar *calendar = [NSCalendar currentCalendar];
     
         dateFormatter.dateFormat = @&quot;ddMMM&quot;;
         for (UInt16 i = 0; i &lt; 7; i++) {
           
             NSDate *nextDate = [calendar dateByAddingUnit:NSCalendarUnitDay value:i toDate:today options: 0];
         
             [_weekdates addObject:[dateFormatter stringFromDate: nextDate]];
             
             NSDateComponents* components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:nextDate]; // Get necessary date components
             
             [components month];
  
             NSLog(@&quot;%@&quot;, components); 
  
  }
  </code></pre>