js 毫秒转换为标准时间

Posted where there is a will, there i

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了js 毫秒转换为标准时间相关的知识,希望对你有一定的参考价值。

function dateForm(time){
                var unixTimestamp = new Date( 1477386005*1000 );
                commonTime = unixTimestamp.toLocaleString();
            }
            Date.prototype.toLocaleString = function() {
                return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate() + "/" + this.getHours() + ":" + this.getMinutes() + ":" + this.getSeconds();
            };

  new Data(‘毫秒数’)是标准时间,

  new Data().getTime()是把标准时间转换成毫秒数

以上是关于js 毫秒转换为标准时间的主要内容,如果未能解决你的问题,请参考以下文章

vue.js怎样将时间戳转化为日期格式

.net下怎么把毫秒数转换成标准时间戳

js对时间的一些操作

vue.js怎样将时间戳转化为日期格式

js实现倒计时

js将标准时间转换为时间戳在苹果手机显示NaN