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

141
Vistas
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 Respuestas
Responde la pregunta

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 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