Skip to content

Commit 2fcb417

Browse files
committed
remove seconds of last updated date
1 parent 88a2802 commit 2fcb417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/date.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const formatDate = (date: Date) => {
22
const dateStr1 = date.toISOString().split('T')[0]
3-
const dateStr2 = date.toISOString().split('T')[1].split('.')[0]
3+
const dateStr2 = date.toISOString().split('T')[1].slice(0, 5)
44

55
return `${dateStr1} ${dateStr2}`
66
}

0 commit comments

Comments
 (0)