Skip to content

Commit

Permalink
Fix qd objet date invalide
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-perso committed Jan 28, 2024
1 parent bb8466c commit 9d220c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function formatBytes(bytes, decimals = 2) {
// Fonction pour afficher une date/temps plus proprement
function formatDate(date){
if(typeof date == 'string' || typeof date == 'number') date = new Date(date)
if(!(date instanceof Date)) return 'N/A'
return date.toLocaleDateString('fr-FR', { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' })
}

Expand Down

0 comments on commit 9d220c5

Please sign in to comment.