js將字符串 YYMMDDHHmmss 轉化爲 date類型

微信支付的回調參數time_end爲日期字符串。 javascript 需求:將20190523101156轉化爲轉換爲Date日期格式Thu May 23 2019 10:11:56 GMT+0800 (中國標準時間)java const str2date = (dateString)=> { const pattern = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{
相關文章
相關標籤/搜索