JavaScript 關於日期 轉換formatDate

  export function formatDate(date, fmt) {   //1.獲取年份   if (/(y+)/.test(fmt)){     fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))   }      //2.獲取月、日和時間   let o = {
相關文章
相關標籤/搜索