一个把时间戳转成日期的javascript函数

从新浪挖来的
<script>
function getLocTime(nS) {
    return new Date(parseInt(nS) * 1000).toLocaleString().replace(/年|月/g, " - ").replace(/日/g, " ");
}
alert(getLocTime(1177824835));
</script>

posted on 2007-05-21 01:19  晓光  阅读(1700)  评论(0)    收藏  举报

导航