Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 javascript 中找出 UTC 日期整数的年份?谢谢!
假设您的“UTC 日期整数”表示以毫秒为单位的时间:
var date = new Date(utcInteger); console.log(date.getUTCFullYear());