title: Subtract 7 days from current date
body: <p>It seems that I can't subtract 7 days from the current date. This is how i am doing it:</p>
  
  <pre><code>NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
  NSDateComponents *offsetComponents = [[NSDateComponents alloc] init];
  [offsetComponents setDay:-7];
  NSDate *sevenDaysAgo = [gregorian dateByAddingComponents:offsetComponents toDate:[NSDate date] options:0];
  </code></pre>
  
  <p>SevenDaysAgo gets the same value as the current date.</p>
  
  <p>Please help.</p>
  
  <p>EDIT: In my code I forgot to replace the variable which gets the current date with the right one. So above code is functional.</p>