首页 > 其他 > 详细

getUTCHours

时间:2014-11-19 17:59:44      阅读:171      评论:0      收藏:0      [点我收藏+]

getUTCMinutes() 方法可根据世界时 (UTC) 返回时间的分钟字段。

    function timeFormat(ms){
        if (!ms) return 0;
        var date = new Date(ms),
            h = date.getUTCHours(),
            m = date.getUTCMinutes(),
            s = date.getUTCSeconds(),
            timeStr = ‘‘;

        if (h) timeStr += h +小时;
        timeStr += m + + s + ;
        return timeStr;
    }
timeFormat(毫秒数);

 

getUTCHours

原文:http://www.cnblogs.com/jiangtuzi/p/4108734.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!