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

188
Views
How can I found the most near date in array about Events, and return the "Next" event?

I have a array about Events. How can I found the most near date in array about Events, and return the "Next" event ?

I need a function that use a default parameter "today now" or specific date, and return the Next event. I will render the result in a template on Vue3 composition api.

const data = [
  {id: 1, date:'April 5 2022, 9:00hs', eventName:'dancing ballet', city:'Sao Paulo'},
  {id: 2, date:'April 15 2022, 19:00hs', eventName:'party friends', city:'Buenos Aires'},
  {id: 4, date:'April 25 2022, 8:00hs', eventName:'school test', city:'Sao Paulo'},
  {id: 5, date:'April 30 2022, 21:00hs', eventName:'dinner', city:'Sao Paulo'}
];

const nextEvent = ??
  

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!