📌  相关文章
📜  javascript 从日期获取一年中的某一天 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:25.740000             🧑  作者: Mango

代码示例3
//Month -> 0= Jan, 11=Dec | myDate = 6 Dec 2019 10:45
var myDate = new Date(2019, 11, 06, 10, 45);
var dayInYear = Math.floor((myDate - new Date(myDate.getFullYear(), 0, 0)) / (1000 * 60 * 60 * 24));