- if (date.length == 11) {
- switch (date.substr(3,3).toLowerCase()) {
- case "jan": var month = "01"; break;
- case "feb": var month = "02"; break;
- case "mar": var month = "03"; break;
- case "apr": var month = "04"; break;
- case "may": var month = "05"; break;
- case "jun": var month = "06"; break;
- case "jul": var month = "07"; break;
- case "aug": var month = "08"; break;
- case "sep": var month = "09"; break;
- case "oct": var month = "10"; break;
- case "nov": var month = "11"; break;
- case "dec": var month = "12"; break;
- // default: var month = "00";
- }
- return date.substr(7,4)+month+date.substr(0,2);
- } else if (date.length == 10) {
- if (ts_europeandate == false) {
- return date.substr(6,4)+date.substr(0,2)+date.substr(3,2);
+ if ( date.length == 11 ) {
+ switch ( date.substr( 3, 3 ).toLowerCase() ) {
+ case 'jan':
+ var month = '01';
+ break;
+ case 'feb':
+ var month = '02';
+ break;
+ case 'mar':
+ var month = '03';
+ break;
+ case 'apr':
+ var month = '04';
+ break;
+ case 'may':
+ var month = '05';
+ break;
+ case 'jun':
+ var month = '06';
+ break;
+ case 'jul':
+ var month = '07';
+ break;
+ case 'aug':
+ var month = '08';
+ break;
+ case 'sep':
+ var month = '09';
+ break;
+ case 'oct':
+ var month = '10';
+ break;
+ case 'nov':
+ var month = '11';
+ break;
+ case 'dec':
+ var month = '12';
+ break;
+ // default: var month = '00';
+ }
+ return date.substr( 7, 4 ) + month + date.substr( 0, 2 );
+ } else if ( date.length == 10 ) {
+ if ( ts_europeandate == false ) {
+ return date.substr( 6, 4 ) + date.substr( 0, 2 ) + date.substr( 3, 2 );