javascript milliseconds from epoch code example
Example 1: convert date and time into epoch javascript
var someDate = new Date(dateString);
someDate = someDate.getTime();
Example 2: get milliseconds since epoch for 12am today javascript
var d = new Date();
d.setUTCHours(0,0,0,0);
console.log(+d);