moment locale code example
Example 1: format a date moment
moment(testDate).format('MM/DD/YYYY');
Example 2: moment js npm
moment.locale();
moment().format('LT');
moment().format('LTS');
moment().format('L');
moment().format('l');
moment().format('LL');
moment().format('ll');
moment().format('LLL');
moment().format('lll');
moment().format('LLLL');
moment().format('llll');
Example 3: moment to javascript date
let now = moment()
let now = now.toDate()
Example 4: moment format heure
var time = "15:30:00";
var formatted = moment(time, "HH:mm:ss").format("LT");
console.log(formatted);
Example 5: moment with locales
moment-with-locales.js