Commit 310c4354 authored by Mat's avatar Mat

javascript, 2 fonctions pour afficher les dates

parent 6d0188aa
......@@ -71,7 +71,7 @@
tr.appendChild(td2);
let td3 = document.createElement('td');
td3.textContent = json[i].created_at;
td3.textContent = formatStringDate(json[i].created_at);
tr.appendChild(td3);
let td4 = document.createElement('td');
......
function formatDate(date) {
return date.getDate() + '/' + (date.getMonth() +1) + '/' + date.getFullYear();
}
function formatStringDate(string) {
return formatDate(new Date(string));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment