moment date format MM/DD code example
Example 1: moment format date dd/mm/yyyy
moment(new Date()).format("DD/MM/YYYY")
Example 2: timestamp convert moment vue
var day = moment.unix(1318781876); //seconds
var day = moment(1318781876406); //milliseconds
// and then:
console.log(day.format('dddd MMMM Do YYYY, h:mm:ss a'));
// "Sunday October 16th 2011, 9:17:56 am"
Example 3: moment diff
var a = moment([2007, 0, 29]);
var b = moment([2007, 0, 28]);
a.diff(b, 'days') // 1