Get Unix timestamp for date in JavaScript

Math.round(new Date("2002-09-16").getTime() / 1000)

source