I have my map where I display some incidents over time. Until now I used the data which is filtered like this 

```
dpG = d3.time.format("%d.%m.%Y").parse;
dpS = d3.time.format("%Y-%m-%d").parse;
var minDate = dpG("01.01.2015");
var maxDate = dpG("31.12.2015");
var secondsInDay = 60 * 60 * 24;
d3.select('#slider3').call(d3.slider()
  .axis(true).min(minDate).max(maxDate)
  .on("slide", function(evt, value) {
    newDataG = site_dataG.features.filter(function(d){
var date = (dpG(d.properties.date).getTime() === new Date(value).getTime());
      // console.log(date)
      //console.log(new Date(value));

      console.log(dpG(d.properties.date));
      return(date);
    });
    // newDataS = site_dataS.features.filter(function(d){
    //   return dpS(d.properties.Date) < new Date(value);
    // });
    // console.log(newDataG);
        // console.log("New set size ", newDataG.length);

    displaySitesG(newDataG);
    // displaySitesS(newDataS);
  })
);

```

But now I tried to filter for only one day and not for all days until `new Date(value)`
So I tried something like this 

```
newDataG = site_dataG.features.filter(function(d){
  var date = dpG(d.properties.date) == new Date(value);
  // console.log(date)
  //console.log(new Date(value));
  return(date);
});

```

Which turned out to be not working at all. 

And something like this displays all data at once.

```
var date = new Date(value);

```

The other files is [github repo](https://github.com/RitterLean/Timeline_world) if you need to see

EDIT2:

```
date1 = Math.round(dpG(d.properties.date).getTime() / (1000*60*60*24));
date2 = Math.round(new Date(value).getTime() / (1000*60*60*24));
console.log(date1);
console.log(date2)

```

gives me this
[![log1](https://i.stack.imgur.com/Ua6Bo.png)](https://i.stack.imgur.com/Ua6Bo.png)