forked from creations/profilePage
move to biomejs
This commit is contained in:
parent
7d78a74a25
commit
d91e832eab
19 changed files with 99 additions and 259 deletions
|
@ -1,6 +1,6 @@
|
|||
export function timestampToReadable(timestamp?: number): string {
|
||||
const date: Date =
|
||||
timestamp && !isNaN(timestamp) ? new Date(timestamp) : new Date();
|
||||
if (isNaN(date.getTime())) return "Invalid Date";
|
||||
timestamp && !Number.isNaN(timestamp) ? new Date(timestamp) : new Date();
|
||||
if (Number.isNaN(date.getTime())) return "Invalid Date";
|
||||
return date.toISOString().replace("T", " ").replace("Z", "");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue