let date = new Date()
console.log(date) // Wed Mar 25 2020 19:29:07 GMT+0800 (中国标准时间)
console.log(date.toString()) // Wed Mar 25 2020 19:42:56 GMT+0800 (中国标准时间)
console.log(date.toTimeString()) // 19:39:22 GMT+0800 (中国标准时间)
console.log(date.toGMTString()) // Wed, 25 Mar 2020 11:39:22 GMT
console.log(date.toUTCString()) // Wed, 25 Mar 2020 11:42:56 GMT
console.log(date.toDateString()) // Wed Mar 25 2020
console.log(date.toLocaleDateString()) // 2020/3/25
console.log(date.toLocaleString()) // 2020/3/25 下午7:29:07
console.log(date.toLocaleTimeString()) // 下午7:42:56
console.log(date.toISOString()) // 2020-03-25T11:39:22.076Z
console.log(date.toJSON()) // 2020-03-25T11:39:22.076Z
console.log(date.toSource()) // 报错
console.log(date.toLocaleFormat()) // 报错
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- ovod.cn 版权所有 湘ICP备2023023988号-4
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务