I use moment(d, "YYYYMMDD").fromNow(); to get diff between date now and some date, but I would like to get without string "a few days ago
If you want just to get the difference between two dates instead of a relative string just use the diff function.
var date = moment("20170101", "YYYYMMDD");
var date7 = moment("20170108", "YYYYMMDD");
var mins7 = moment("20170101 00:07", "YYYYMMDD HH:mm");
var secs1 = moment("20170101 00:00:01", "YYYYMMDD HH:mm:ss");
console.log(date7.diff(date, "days") + "d"); // "7d"
console.log(mins7.diff(date, "minutes") + "m"); // "7m"
console.log(secs1.diff(date, "seconds") + "s"); // "1s"