4,114
edits
No edit summary |
No edit summary |
||
Line 62: | Line 62: | ||
function formatSimpleDate(inputDate) { | function formatSimpleDate(inputDate) { | ||
// Assuming | // Remove spaces from the date string | ||
var formattedDate = | 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; |