I have following code. I don't want to use momentjs and want to compare the date with the below codes.
var i = $filter('date')(Date1, 'short');
var j = $filter('date')(Date2, 'short');
var k = j - i;
if (k<0)
{
return true;
}
else
{
return false;
}
I want to compare my Date1 with Date2 and want to display which one is greatest. But it's not working. So anyone can help me here.