mirror of
https://github.com/FAUSheppy/tmnf-replay-server.git
synced 2025-12-06 23:21:36 +01:00
feat: render date in more human format
This commit is contained in:
@@ -21,6 +21,20 @@
|
|||||||
},
|
},
|
||||||
"columnDefs": [
|
"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,
|
"targets": 3,
|
||||||
"render": function ( data, type, full, meta ) {
|
"render": function ( data, type, full, meta ) {
|
||||||
return '<a href=\"/static/'+data+'\" download>Download</a>';
|
return '<a href=\"/static/'+data+'\" download>Download</a>';
|
||||||
|
|||||||
Reference in New Issue
Block a user