Skip to content

Instantly share code, notes, and snippets.

View escuderomoyano's full-sized avatar

David escuderomoyano

  • Bracnoria
  • Barcelona
View GitHub Profile
@escuderomoyano
escuderomoyano / datefilter.js
Created June 8, 2017 08:39 — forked from Voles/datefilter.js
AngularJS daterange filter
RB.filter('daterange', function ()
{
return function(conversations, start_date, end_date)
{
var result = [];
// date filters
var start_date = (start_date && !isNaN(Date.parse(start_date))) ? Date.parse(start_date) : 0;
var end_date = (end_date && !isNaN(Date.parse(end_date))) ? Date.parse(end_date) : new Date().getTime();