Hacker News new | ask | show | jobs
by onaclov2000 4055 days ago
I'm not 100% sure what he's doing here, however I know when I have used new Date().getTime() it returns something like milliseconds, and thus I had to divide by 1000 to result in seconds, so it appears that he's subtracting milliseconds and getting seconds after the division by 1000.

Typically I believe new Date() is current time/date (http://www.w3schools.com/js/tryit.asp?filename=tryjs_date_ne...) in my experience.

As far as your question how to deal with 5/8/2015, and 8/5/2015, to be honest I don't know that answer.

1 comments

Also assuming I can read, it doesn't look like that function is used, (I searched second in the same file, and in the higher level folder, and couldn't find that function called anywhere)