Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

283
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!