Get seconds of the year in javascript