pandora/static/js/infoViewUtils.js

17 lines
382 B
JavaScript
Raw Permalink Normal View History

2019-11-12 17:50:24 +00:00
'use strict';
pandora.cleanupDate = function(value) {
if (/\d{2}-\d{2}-\d{4}/.test(value)) {
value = Ox.reverse(value.split('-')).join('-')
}
if (/\d{4}i\/\d{2}\/\d{d}/.test(value)) {
value = value.split('/').join('-')
}
if (/\d{2}\/\d{2}\/\d{4}/.test(value)) {
value = Ox.reverse(value.split('/')).join('-')
}
return value
};