修复编译

This commit is contained in:
tangly1024
2022-03-08 12:09:58 +08:00
parent 6007d710d8
commit ff471005bf

View File

@@ -5,6 +5,7 @@
* @returns {string}
*/
export default function formatDate (date, local) {
if (!date) return ''
const d = new Date(date)
const options = { year: 'numeric', month: 'short', day: 'numeric' }
const res = d.toLocaleDateString(local, options)