edit payments history

This commit is contained in:
smanylov
2026-02-25 12:53:18 +07:00
parent 9da0a095cb
commit bc1d5d5337
5 changed files with 39 additions and 73 deletions
+8
View File
@@ -1,5 +1,9 @@
// Форматирование даты из timestamp
export const formatDate = (timestamp: number | string) => {
if (!timestamp) {
return '---'
}
const date = new Date(timestamp);
const day = date.getDate().toString().padStart(2, '0');
const month = (date.getMonth() + 1).toString().padStart(2, '0');
@@ -9,6 +13,10 @@ export const formatDate = (timestamp: number | string) => {
};
export const formatDateTime = (timestamp: number | string) => {
if (!timestamp) {
return '---'
}
const date = new Date(timestamp);
const hours = date.getHours().toString().padStart(2, '0');
const minutes = date.getMinutes().toString().padStart(2, '0');