js日期对象转字符串各方法汇总

    console.log(today.toString());  //Mon Nov 11 2019 11:19:12 GMT+0800 (中国标准时间)
    console.log(today.toISOString());  //2019-11-11T03:19:12.534Z
    console.log(today.toTimeString());  //11:19:12 GMT+0800 (中国标准时间)
    console.log(today.toUTCString());  //Mon, 11 Nov 2019 03:19:12 GMT
    console.log(today.toLocaleDateString());  //2019/11/11
    console.log(today.toLocaleString());        //2019/11/11 上午11:19:12
    console.log(today.toLocaleTimeString());  //上午11:19:12
 


problem.ts:
problem.ts:220 
problem.ts:221 
problem.ts:222 
problem.ts:223 
problem.ts:224 

posted @ 2019-09-12 14:28  johnjackson  阅读(12164)  评论(0编辑  收藏  举报