js获取当天零点的时间戳

var now_date = new Date();//获取Date对象
now_date.setHours(0);//设置小时
now_date.setMinutes(0);//设置分钟
now_date.setSeconds(0);//设置秒
now_date.setMilliseconds(0);//设置毫妙
var timestamp = now_date.getTime();//获取毫秒时间戳
var unix_timestamp = Math.floor(date.getTime()/1000);获取unix时间戳
原文地址:https://www.cnblogs.com/shixiuxian/p/9354560.html