I have an API which returns date values. Sample value is like 1521441000. When I formatted the date using javascript, I am getting Jan 18 1970 08:07 PM. Also I tried using Javascript Date function. Then also the same reply. Please see the console screen shot. As per the expectation I want this months(March - April 2018) date. Which I am fitering using API call. This is a third party API.I want to confirm is this the problem with API.
Why this is happening. Is this the problem with the date which is returned from the API? Or Is there any problem in my comparison?