js 14位字符串 轉日期

const pattern = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/;
const newDate = new Date(timeEnd.replace(pattern, '$1-$2-$3 $4:$5:$6'));
相關文章
相關標籤/搜索