Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

285
Vistas
Can't specify exact date when retrieving Facebook request dates

https://m.facebook.com/friends/center/requests/outgoing/#friends_center_main enter image description here

Hello, I am coding a chrome extension that will cancel friend requests sent on Facebook after a certain date. The problem is that Facebook writes the request dates in minutes, days, months, years etc. It is not possible to detect them perfectly on the plugin.

<abbr data-store="{&quot;time&quot;:1642405814,&quot;short&quot;:true,&quot;forceseconds&quot;:false}" data-sigil="timestamp" data-store-id="0">3 ay</abbr>

The dates are given as attributes in json format as below, but I could not find how to process this date. {"time":1642405814,"short":true,"forceseconds":false}

console.log(new Date(1642405814))

If I want to use new date directly as above, the year is 1970, but the request was sent a few months ago. It is outputting the wrong date.

 console.log(new Date(Date.now() - new Date(1642405814)))

Although I converted it as above, it shows that it is 1 month, but 3 months have passed since the request. I can't figure out how to set this date. Can you please help?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Just add three zeros of a millisecond to the end of the time

console.log(new Date(1642405814000))
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda