📅  最后修改于: 2022-03-11 15:03:18.303000             🧑  作者: Mango
var todayDate = new Date();
var Todaymilli = todayDate.getTime();
var todayMin = todayDate.getMinutes();
var diff = Todaymilli - todayMin;
var diffMin = diff/(1000*60*60);
var accurateMin = Math.floor(diffMin);
document.write("Current Date: " + todayDate);
document.write("
Elapsed milliseconds since midnight, Jan 1, 1970: " + Todaymilli);
document.write("
Elapsed minutes since midnight, Jan 1, 1970: " + accurateMin)