Okay, I am using WordPress and JSON API to make WordPress as a backend of my application, and now I am dealing with getting dates from post and add class if the post is new or not, and I am wonder if this is a job of a filter or just extend the object to add a property of new, basically iterating through the array of posts and adding a property of `isNew`

Can't get my logic right though.

Lets say I am getting posts from a `Post` service like so

```
$scope.posts = [];
Post.getPosts().then(function(posts){
  $scope.posts = posts;
});

```

Now before I do this : $scope.posts = posts, I want Angular to extend the properties of each post, adding `isNew`

```
var today = new Date();
var newMark = new Date();
newMark.setDate(newMark.getDate() - 5);

Post.getPosts(5).then(function (re) {
  angular.forEach(re.posts, function(post, key){
    var postDate = new Date(post.date);
    console.log(today - postDate < newMark); // lol, I don't have quite a logic here.
    // console.log(postDate - today < today - newMark);
  });
});

```

Lol, can't seem to think today.