forked from creations/profilePage
first commit
This commit is contained in:
commit
b11c87a506
26 changed files with 1782 additions and 0 deletions
6
src/helpers/char.ts
Normal file
6
src/helpers/char.ts
Normal file
|
@ -0,0 +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";
|
||||
return date.toISOString().replace("T", " ").replace("Z", "");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue