gpt4 book ai didi

javascript - 从时间戳中提取月或日或年

转载 作者:数据小太阳 更新时间:2023-10-29 05:52:21 24 4
gpt4 key购买 nike

我想知道如何从时间戳中获取特定的日期格式(日期或月份或日期或年份)。我想在 Backbone JS 的 View 中使用它

最佳答案

var d = new Date(1397639141184);
alert(d.getDate() + '/' + (d.getMonth()+1) + '/' + d.getFullYear());

关于javascript - 从时间戳中提取月或日或年,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23104873/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com