From a0f4286e69fa411fedd2d56f1bb2468af1ac1753 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期四, 23 十二月 2021 16:02:41 +0800 Subject: [PATCH] update: TODO#131357 職業選項置中 --- PAMapp/plugins/filters/date.filter.ts | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/PAMapp/plugins/filters/date.filter.ts b/PAMapp/plugins/filters/date.filter.ts index 281c148..069a7af 100644 --- a/PAMapp/plugins/filters/date.filter.ts +++ b/PAMapp/plugins/filters/date.filter.ts @@ -24,12 +24,14 @@ return compareDate.getFullYear() === today.getFullYear(); }; + const minutes = date.getMinutes() > 9 ? date.getMinutes() : `0${date.getMinutes()}`; + if (isThisYear(date)) { return isToday(date) - ? `隞予 ${date.getHours()}:${date.getMinutes()}` - : `${date.getMonth() + 1}���${date.getDate()}� ${date.getHours()}:${date.getMinutes()}`; + ? `隞予 ${date.getHours()}:${minutes}` + : `${date.getMonth() + 1}���${date.getDate()}� ${date.getHours()}:${minutes}`; } else { - return `${date.getFullYear()}撟�${date.getMonth() + 1}���${date.getDate()}� ${date.getHours()}:${date.getMinutes()}`; + return `${date.getFullYear()}撟�${date.getMonth() + 1}���${date.getDate()}� ${date.getHours()}:${minutes}`; }; }) -- Gitblit v1.8.0