Compare day month and year Set the time portion of your created date to zeros. var d = new Date(); d.setHours(0,0,0,0);