title: How do I do this NSPredicate code?
body: <p>I'm having trouble with NSPredicate. I have a core data object called Entry, which contains an NSDate called creationDate. I want to compare this to the variable I have called date.</p>
  
  <p>I'm using an NSDate category to pull out the individual year of both objects, and a core data category to perform a predicate on all Entry objects in my core data store.</p>
  
  <pre><code>[Entry allForPredicate:[NSPredicate predicateWithFormat:@"creationDate.year == %i",  date.year]];
  </code></pre>
  
  <p>I think this is wrong, as it's not giving me the result I expect, and is instead turning up blank.</p>
  
  <p>Where am I going wrong with this?</p>