Create a new date using the current day/month/year, and get the difference.
var now = new Date(),
then = new Date(
now.getFullYear(),
now.getMonth(),
now.getDate(),
0,0,0),
diff = now.getTime() - then.getTime(); // difference in milliseconds
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…