not all dates are actual dates

This commit is contained in:
j 2018-08-05 18:42:23 +01:00
parent c091859bc7
commit 242b3bb374
1 changed files with 6 additions and 2 deletions

View File

@ -565,10 +565,14 @@ pandora.ui.infoView = function(data) {
function formatValue(key, value) {
var ret;
if (key == 'date') {
if (key == 'date' && (!value || value.split('-').length < 4)) {
ret = value ? Ox.formatDate(value,
['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length]
['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length],
true
) : '';
if (ret == NaN) {
ret = value
}
} else if (key == 'links') {
ret = value.split(', ').map(function(link) {
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';