Display balance evolution chart
This commit is contained in:
@@ -18,3 +18,13 @@ export function dateToTime(date: Dayjs | undefined): number | undefined {
|
||||
export function time(): number {
|
||||
return Math.floor(new Date().getTime() / 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format date from unix time (secondes since Epoch)
|
||||
*/
|
||||
export function fmtDateFromTime(time: number): string {
|
||||
const d = new Date(time * 1000);
|
||||
return `${d.getDate().toString().padStart(2, "0")}/${(d.getMonth() + 1)
|
||||
.toString()
|
||||
.padStart(2, "0")}/${d.getFullYear()}`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user