function getDays(dt1, dt2) {
function parse(dt) {
return dt.replace(/(\d+)\/(\d+)\/(\d+)/, function(all, a, b, c){
return (c < 100 ? +c + 2000 : c) + '/' + (+b - 1) + '/' + a;
});
}
var outDT1 = (new Date(Date.UTC.apply(null, parse(dt1).split('/')))).getTime();
var outDT2 = (new Date(Date.UTC.apply(null, parse(dt2).split('/')))).getTime();
return ( outDT1 > outDT2 ? outDT1 - outDT2 : outDT2 - outDT1) / 1000 / 60 / 60 / 24;
}
alert(getDays('01/01/13', '28/2/2013')); // разница 58 дней