JavaScript - Converting a Date() into seconds [duplicate]
问题 This question already has answers here : Javascript Convert Date Time string to Epoch (7 answers) Closed 4 years ago . I'm using the Hacker News API made at Algolia here: https://hn.algolia.com/api I'm a bit confused as it says to search for posts since a certain time it says to run the following query: Comments since timestamp X (in second) http://hn.algolia.com/api/v1/search_by_date?tags=comment&numericFilters=created_at_i>X It says to replace X with a timestamp in seconds, but how exactly