This commit is contained in:
tim
2025-01-16 20:17:03 -04:00
parent 19a8ffbbd4
commit 0545cd6e97
51 changed files with 482 additions and 436 deletions

View File

@@ -141,3 +141,13 @@ export function parseFill(obj) {
fee = BigInt(fee)
return {tx, time, filledIn, filledOut, fee}
}
export function timestamp(date = null) {
if (date === null)
date = new Date()
return Math.round(date.getTime() / 1000)
}
export function dateString(datetime) {
return datetime.toLocaleString({dateStyle: 'medium', timeStyle: 'short'})
}