feat: introduce personal access tokens for authorization (#4094)

Co-authored-by: Nivedin <53208152+nivedin@users.noreply.github.com>
This commit is contained in:
James George
2024-06-23 23:15:31 -07:00
committed by GitHub
parent c2085b8b6f
commit 021ecf17ce
9 changed files with 859 additions and 228 deletions

View File

@@ -1,10 +1,17 @@
export function shortDateTime(date: string | number | Date) {
export function shortDateTime(
date: string | number | Date,
includeTime: boolean = true
) {
return new Date(date).toLocaleString("en-US", {
year: "numeric",
month: "short",
day: "numeric",
hour: "numeric",
minute: "numeric",
second: "numeric",
...(includeTime
? {
hour: "numeric",
minute: "numeric",
second: "numeric",
}
: {}),
})
}