我試圖確定當天UTC的開始和結束時間。確定當天的開始和結束時間(UTC)(JAVASCRIPT)
目前這是我的解決方案。 `
var starttime = date.getTime() -(date.getHours() * 3600000); //subtracting a hours to go back to start time of the day.
var endtime = low + 86400000; //adding 24 hours to the start time
`
任何幫助表示讚賞!謝謝
重複問題: http://stackoverflow.com/questions/8636617/how-to-get-start-and-end-of-day-in-javascript –