title: Core Data- predicate with dates
body: <p>I'm stumped trying to write a predicate for "Recently Completed" tasks, i.e. show the task if it was completed within the last 7 days. I think I need to do something like this: "if NOW &lt; dateCompleted + 7 days". </p>
  
  <p>The dateCompleted is an attribute on the table, but I'm not sure how I'm supposed to get it's value and add 7 days to it from within the predicate. I guess I need to fetch the attribute value first before writing the NSPredicate, but how? I don't have access to the managedObject at this point. </p>
  
  <p>This might be close the solution, but I can't figure out how to define 'oneWeek' and I don't think you can just add values when defining the predicate:</p>
  
  <pre><code>NSPredicate *pred = [NSPredicate predicateWithFormat:@"%@ &lt; todoCompletedDate + %@", [NSDate date], oneWeek];
  </code></pre>