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*.
10 lines (7 loc) • 389 B
JavaScript
const past = new Date('2013-12-04 10:00:00');
const options = { year: 'numeric', month: 'short', day: 'numeric' };
const longOptions = {...options, weekday: 'long', month: '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>