moment js locale fr code example Example 1: format a date moment moment(testDate).format('MM/DD/YYYY'); Example 2: moment with locales moment-with-locales.js