const formatDate = (timestamp: number) => { const time = new Date((timestamp - 1) * 24 * 3600000 + 1); time.setFullYear(time.getFullYear() - 70); const year = time.getFullYear(); const month = time.getMonth() + 1; const date = time.getDate() - 1; const format = ‘-‘; return ( year + format + (month < 10 ? `0${month}` : month) + format + (date < 10 ? `0${date}` : date) ); };