not all dates are actual dates
This commit is contained in:
parent
c091859bc7
commit
242b3bb374
1 changed files with 6 additions and 2 deletions
|
@ -565,10 +565,14 @@ pandora.ui.infoView = function(data) {
|
||||||
|
|
||||||
function formatValue(key, value) {
|
function formatValue(key, value) {
|
||||||
var ret;
|
var ret;
|
||||||
if (key == 'date') {
|
if (key == 'date' && (!value || value.split('-').length < 4)) {
|
||||||
ret = value ? Ox.formatDate(value,
|
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') {
|
} else if (key == 'links') {
|
||||||
ret = value.split(', ').map(function(link) {
|
ret = value.split(', ').map(function(link) {
|
||||||
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
|
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
|
||||||
|
|
Loading…
Reference in a new issue