// PROGRAMME ET REDIGE PROPREMENT LA DATE
// TRANSFORME JOUR, DATE, MOIS
var dDate = new Date() ;
var LeJour = new Array("dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi");
var Jour = LeJour[dDate.getDay()];
var Numero = dDate.getDate();
if ( Numero == 1 ) { Numero = "1er"; }
var LeMois = new Array("janvier","f\u00e9vrier","mars","avril","mai","juin","juillet","ao\u00fbt","septembre","octobre","novembre","d\u00e9cembre");
var Mois = LeMois[dDate.getMonth()];
var Annee = dDate.getFullYear();
var datine = ""+Numero+" "+Mois+" "+Annee;
var datinou = Jour+" "+Numero+" "+Mois+" "+Annee;
// COMPTEUR HORLOGE VIVANTE
var displayHours = document.getElementById('displayHours');
var displayMinutes = document.getElementById('displayMinutes');
var displaySeconds = document.getElementById('displaySeconds');
var currentTime = new Date();
var hrs = currentTime.getHours() + "h" ;
var min = currentTime.getMinutes();
if (currentTime.getMinutes() < 10) {min = "0" + currentTime.getMinutes() + " et "} else
min = currentTime.getMinutes() + " et " ;
var sec = currentTime.getSeconds()
if (currentTime.getSeconds() < 2) {sec = currentTime.getSeconds() + " seconde"} else
sec = currentTime.getSeconds() + " secondes" ;
// FORMATAGE EN NOMBRE SIMPLIFIE AVEC PRECISION DECIMALE DU STYLE : 55 896,68
// FORMATAGE EN EUROS FRANCAIS DU STYLE : 5 234,56 €
// FORMATAGE EN EUROS / POUR REMPLACER € PAR EUROS, UTILISER LE FORMATAGE DES NOMBRES, ET ECRIRE : +" euros"
// FORMATAGE EN DATE : hour12 qui vaut true ou false
// FORMATAGE EN DATE : weekday, year, month, day, hour, minute, second peuvent avoir comme valeurs "numeric", "long", "short", "2-digit"
// FORMAT FRIC FR AVEC PRECISION DECIMALES ECRIRE : var fricform = new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR', maximumFractionDigits: 0, minimumFractionDigits: 0 }).format(fric);
// FORMAT NOMBRE FR AVEC PRECISION DECIMALE ECRIRE : var nbreform = new Intl.NumberFormat("fr-FR", {maximumFractionDigits: 2, minimumFractionDigits: 2}).format(nombre);
// FORMAT DATE ET HEURE ECRIRE : var heurform = new Intl.DateTimeFormat("fr-FR", {hour12: false, weekday: "long", year:"numeric", month:"long", weekday:"long", day:"numeric", hour: "2-digit", minute: "2-digit", second:"2-digit"}); ET ENLEVER CE QU'ON NE VEUT PAS
// FORMATAGE EN DATE : hour12 vaut true ou false
// FORMATAGE EN DATE : weekday, year, month, day, hour, minute, second peuvent avoir comme valeurs "numeric", "long", "short", "2-digit
// ECRIRE DANS LE TEXTE : var dt=new Date();
// document.write("Il est exactement "+heurform.format(dt));
// https://www.toutjavascript.com/reference/ref-intl.numberformat.php
// https://www.toutjavascript.com/reference/ref-intl.datetimeformat.php
// PHRASE A ADAPTER
document.getElementById("ladate").innerHTML = " le "+datine+" donc, "
// DANS LE HTML, METTRE :