You can use .diff()
like this:
moment().diff('2014-05-10', 'days'); // 3
You can extend moment to get a diffInDays
function if you'd like:
moment.fn.diffInDays = function(m) {
return this.diff(m, 'days');
}
Then you can do like:
moment().diffInDays(moment('2014-05-10'));
or even just:
moment().diffInDays('2014-05-10');