fix the problem that the transaction date not display sometimes in transaction list page

This commit is contained in:
MaysWind
2023-08-01 21:47:26 +08:00
parent 2188e8dd78
commit 5b5f1280af
3 changed files with 8 additions and 1 deletions
+5
View File
@@ -105,6 +105,11 @@ export function getUnixTime(date) {
return moment(date).unix();
}
export function getShortDate(date) {
date = moment(date);
return date.year() + '-' + (date.month() + 1) + '-' + date.date();
}
export function getYear(date) {
return moment(date).year();
}