add payments history tanstak-table

This commit is contained in:
smanylov
2026-02-21 15:07:37 +07:00
parent 4f7b464bed
commit c88646b64c
8 changed files with 616 additions and 29 deletions
+17
View File
@@ -0,0 +1,17 @@
// Форматирование даты из timestamp
export const formatDate = (timestamp: number | string) => {
const date = new Date(timestamp);
const day = date.getDate().toString().padStart(2, '0');
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const year = date.getFullYear();
return `${day}.${month}.${year}`;
};
export const formatDateTime = (timestamp: number | string) => {
const date = new Date(timestamp);
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');
return `${hours}:${minutes}`;
};