title: Angular date range filter
body: <p>I was wondering if anyone could help me.  I'm currently trying to get a date filter to work in Angular.  I could be going about this completely the wrong way but just thought I would ask.</p>
  
  <p>I currently have an ng-repeat looping through an array of objects.  My objects have the following fields: title, sentBy and recevied.  Received is in UTC format and my filter basically takes two inputs also in utc format for start and end date.  The filter then checked if the received is greater than or equal to to start date or less than or equal to the end date.  My issue is that the input to the filter is the input of the whole object.  Im not sure how to access the received field of the object within the filter to do the comparrison.  I tried input.received but it didnt seem to work. heres a sample of my code.</p>
  
  <pre><code>.filter('dateRange', function(){
  
  return function(input, startDate, endDate) {
  
      if(input.received &gt;= startDate &amp;&amp; input &lt;= endDate){
          return input;
      }
  
  };
  </code></pre>
  
  <p>})</p>
  
  <p>As I say I could be going about this completely wrong but any help would be greatly appreciated.</p>
  
  <p>edit: 
  my html code is as simple as below:</p>
  
  <pre><code>    &lt;div ng-repeat="message in messages | dateRange: startDate : endDate " &gt;
  </code></pre>