Commit aab7de91 authored by raca's avatar raca

feat: update

parent 91b4c533
...@@ -15,8 +15,11 @@ function formatTime (date: Date): string { ...@@ -15,8 +15,11 @@ function formatTime (date: Date): string {
.padStart(2, '0')}:${seconds.toString().padStart(2, '0')}` .padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`
} }
export function convertDateTime (input: string): string { export function convertDateTime (value: string): string {
const date = new Date(input) if (!value) {
return '-'
}
const date = new Date(value)
const monthDay = formatMonthDay(date) const monthDay = formatMonthDay(date)
const time = formatTime(date) const time = formatTime(date)
return `${monthDay} ${time}` return `${monthDay} ${time}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment