title: iPhone NSDate setDay
body: <p>Have a question. I'm working with NSDate and what i need is to get date that was 23 day before. How to do that ? I tried to to something like this:</p>
  
  <pre><code>        NSDate *date = [NSDate date];                          
          NSCalendar *calendar = [NSCalendar currentCalendar];
          NSDateComponents *dateComponents = [calendar components:
              (NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | 
               NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit)
              fromDate:date];
      [dateComponents setDay:-23];
      [dateComponents setHour:0];
      [dateComponents setMinute:0];
      [dateComponents setSecond:0];
      date = [calendar dateFromComponents:dateComponents];
  </code></pre>
  
  <p>But its not works...ANy ideas ? thanks..</p>