UNPKG

nodebook

Version:

Node.js • Apprendre par la pratique. Familiarisez-vous avec JavaScript, Node.js et l'écosystème de modules npm. Apprenez à concevoir et à déployer des *applications web* et des *outils en ligne de commande*.

15 lines (12 loc) 418 B
const past = new Date('2013-12-04 10:00:00'); const options = { year: 'numeric', month: 'short', day: 'numeric' }; const longOptions = { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long' }; const fr = new Intl.DateTimeFormat('fr-FR', options); const frLong = new Intl.DateTimeFormat('fr-FR', longOptions); console.log(fr.format(past)); // <1> console.log(frLong.format(past)); // <2>