format dates as dates

This commit is contained in:
j 2017-03-04 12:05:14 +01:00
parent 7ac8fefcf4
commit 3a6bfa8946

View File

@ -716,6 +716,11 @@ pandora.ui.infoView = function(data) {
var ret;
if (key == 'year') {
ret = formatLink(value, 'year');
} else if (['releasedate', 'dateofcensorcertificate'].indexOf(key) > -1) {
ret = value ? Ox.formatDate(value,
['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length],
true
) : '';
} else if (key == 'links') {
ret = value.split(', ').map(function(link) {
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';