1
0
mirror of https://github.com/fspc/water-the-theme.git synced 2025-03-12 07:13:22 -04:00

Properly processes time when it is 'n/a'.

When a site is down time is now properly processed.
This commit is contained in:
Jonathan Rosenbaum 2016-12-07 06:54:18 +00:00
parent 844e5f2dbf
commit b2c537e347

View File

@ -37,9 +37,14 @@
$("td[datetime]").each(function(key,value){
var dt = $(value).attr('datetime');
var d = new Date(Number(dt));
d = d.toLocaleString();
$(this).html(d);
if (dt != 'n/a') {
var d = new Date(Number(dt));
d = d.toLocaleString();
$(this).html(d);
} else {
$(this).html(dt);
}
});
});