Display balance evolution chart

This commit is contained in:
2025-05-02 11:17:51 +02:00
parent 272c8ab312
commit 56370ec936
9 changed files with 561 additions and 43 deletions

View File

@@ -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()}`;
}