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

143
Views
firebase javascript compare timesamp by seconds

I have a firebase database with some dates written down in what I think is the seconds format. I need to check if a day has passed since that date.

admin.firestore.Timestamp.now()._seconds;

is what I am using to get the current date. I now need to compare it, but I cannot find how to add a day to the date in the firebase, and am not sure if simply using < will compare them properly.

1633399860000 <-- (database date sample)

Thank you!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

So...
First of all the date format was milliseconds.
It seems like it is not a problem to compare dates with a < or >.
To add a day I tried to remove 86400000 (milliseconds) to today's date.

The code is not giving problems for now so I'm guessing it is the right solution.

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!