MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 62: Line 62:


function formatSimpleDate(inputDate) {
function formatSimpleDate(inputDate) {
    // Assuming inputDate is in the format "XX XX XX"
    // Remove spaces from the date string
    var formattedDate = inputDate.slice(0, 2) + '.' + inputDate.slice(2, 4) + '.' + inputDate.slice(4);
    var dateWithoutSpaces = inputDate.replace(/\s/g, '');
    // Assuming dateWithoutSpaces is in the format "XX XX XX"
    var formattedDate = dateWithoutSpaces.slice(0, 2) + '.' + dateWithoutSpaces.slice(2, 4) + '.' + dateWithoutSpaces.slice(4);
    return formattedDate;
    return formattedDate;

Navigation menu