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

79
Views
Cómo trabajar con próximos eventos sin año

Tengo una aplicación nativa de React con eventos donde tengo fechas de eventos en formato ISO. Necesito trabajar con eventos de forma repetitiva anualmente. Los eventos incluyen fechas como cumpleaños y también eventos anuales. Necesito mostrar los próximos eventos para el resto del año en curso y luego mostrar los eventos para el próximo año. ¿Cómo trabajar con eventos sin año y ordenar por fecha actual?

 events.sort((a, b) => { const today = new Date(); const currentYear = today.getFullYear(); const dateA = new Date(a.date); dateA.setFullYear(currentYear); const dateB = new Date(b.date); dateB.setFullYear(currentYear); return dateA - dateB; }) .filter(event => { const today = new Date(); const currentYear = today.getFullYear(); const eventDate = new Date(event.date); eventDate.setFullYear(currentYear); return eventDate > today; }) .splice(0, 5) .map(event => { ...
about 4 years ago · Juan Pablo Isaza
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!