Search code examples
javascriptapidatefoursquaredate-format

What is Foursquare API date format?


I want to get photos of a Foursquare venue with the date when they were taken. Here is an example of Foursquare API response : https://developer.foursquare.com/docs/explore#req=venues/43695300f964a5208c291fe3/photos The createdAt key has a strange date value like 1338472210 or 1318094639.

How to extract the date from these values ?


Solution

  • Looks like a unix timestamp if you pass it to the Date constructor it should parse it