archieve 排序

This commit is contained in:
tangly1024.com
2023-06-30 11:51:08 +08:00
parent 8103e23aac
commit 43b6be392d
2 changed files with 4 additions and 7 deletions

View File

@@ -9,9 +9,7 @@ export default function formatDate (date, local) {
const d = new Date(date)
const options = { year: 'numeric', month: 'short', day: 'numeric' }
const res = d.toLocaleDateString(local, options)
return local.slice(0, 2).toLowerCase() === 'zh'
? res.replace('年', '-').replace('月', '-').replace('日', '')
: res
return res
}
export function formatDateFmt (timestamp, fmt) {