1moment("20111031", "YYYYMMDD").fromNow(); // 10 years ago
2moment("20120620", "YYYYMMDD").fromNow(); // 9 years ago
3moment().startOf('day').fromNow(); // 15 hours ago
4moment().endOf('day').fromNow(); // in 9 hours
5moment().startOf('hour').fromNow(); // an hour ago
1var startDate = moment().subtract(1, 'days'); //one day before the current time
2