mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-19 15:24:25 +01:00
onchain, lightning, and utxo activity cards
This commit is contained in:
12
src/utils/prettyPrintTime.ts
Normal file
12
src/utils/prettyPrintTime.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export function prettyPrintTime(ts: number) {
|
||||
const options = {
|
||||
weekday: 'long',
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric'
|
||||
};
|
||||
|
||||
return new Date(ts * 1000).toLocaleString('en-US', options as any);
|
||||
}
|
||||
Reference in New Issue
Block a user