From b7aa264e105bb624b143bcd94e523911db8d70da Mon Sep 17 00:00:00 2001 From: j Date: Thu, 21 Feb 2019 20:19:24 +0530 Subject: [PATCH] reverse date --- static/js/infoView.indiancinema.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/infoView.indiancinema.js b/static/js/infoView.indiancinema.js index 99e2ca69f..3b8ede318 100644 --- a/static/js/infoView.indiancinema.js +++ b/static/js/infoView.indiancinema.js @@ -733,6 +733,9 @@ pandora.ui.infoView = function(data, isMixed) { if (key == 'year') { ret = formatLink(value, 'year'); } else if (['releasedate', 'dateofcensorcertificate'].indexOf(key) > -1) { + if (/\d{2}-\d{2}-\d{4}/.test(value)) { + value = Ox.reverse(value.split('-')).join('-') + } ret = value ? Ox.formatDate(value, ['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length], true