Skip to content

Commit

Permalink
remove seconds of last updated date
Browse files Browse the repository at this point in the history
  • Loading branch information
mehm8128 committed Oct 3, 2024
1 parent 88a2802 commit 2fcb417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/date.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const formatDate = (date: Date) => {
const dateStr1 = date.toISOString().split('T')[0]
const dateStr2 = date.toISOString().split('T')[1].split('.')[0]
const dateStr2 = date.toISOString().split('T')[1].slice(0, 5)

return `${dateStr1} ${dateStr2}`
}

0 comments on commit 2fcb417

Please sign in to comment.