function getDate(dateSting) {
let date = new Date(dateSting);
if (isNaN(date.getTime())) {
return dateSting;
}
let dd = date.getDate();
if (dd < 10) dd = `0${dd}`;
let mm = date.getMonth() + 1;
if (mm < 10) mm = `0${mm}`;
let yy = date.getFullYear() % 100;
if (yy < 10) yy = `0${yy}`;
return `${dd}.${mm}.${yy}`;
}
console.clear();
let tt = `skdjbfskdhjbjhg`;
console.log(getDate(tt));