js 时间操作

1. timestamp 转时间

   var date=new Date(1410019200000+0800);
console.log(date);//输出 Sun Sep 07 2014 00:00:00 GMT+0800 (中国标准时间)
console.log(date.toLocaleString());//输出 2014年9月7日 上午12:00:00

 

posted on 2016-05-24 19:52  豆沙包没有肉  阅读(100)  评论(0编辑  收藏  举报

导航