feat: render date in more human format

This commit is contained in:
2023-06-16 14:58:33 +02:00
parent a8dffc3e47
commit 1dada02926

View File

@@ -21,6 +21,20 @@
},
"columnDefs": [
{
"targets": 2,
"render": function ( data, type, full, meta ) {
const dateString = data
const dateObj = new Date(dateString);
const options = { day: '2-digit',
month: 'long',
year: 'numeric',
hour: '2-digit',
minute: '2-digit' };
const formattedDate = dateObj.toLocaleString('de-DE', options);
return formattedDate
}
},
{
"targets": 3,
"render": function ( data, type, full, meta ) {
return '<a href=\"/static/'+data+'\" download>Download</a>';