Без сторонней библиотеки, простой инструмент.
let unixTime = 1585737917;
function padStart(num, d) {
d = String(d);
const delta = num - d.length;
if (delta > 0) {
for (let i = 0; i < delta; i++) {
d = "0" + d;
}
}
return d;
}
const pad = padStart.bind(null, 2);
function parseUnixDate() {
const date = new Date(unixTime * 1000);
const [dd, mm, yy] = [
date.getDate(),
date.getMonth() + 1,
date.getFullYear()
];
return `${pad(dd)}-${pad(mm)}-${yy}`;
}
console.log(parseUnixDate(unixTime));