var timestamp1 = Date.parse(new Date()); console.log(timestamp1); //杈撳嚭褰撳墠鏃堕棿鐨勬椂闂存埑var date = new Date(1520324618000); console.log(date); Y = date.getFullYear() + '-'; M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; D = date.getDate() + ' '; h = date.getHours() + ':'; m = date.getMinutes() + ':'; s = date.getSeconds(); console.log(Y+M+D+h+m+s);
Copyright © 2019- baoquwan.com 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务