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

90
Views
Obtener Duración de un trimestre en Luxon

Estoy tratando de obtener la Duración (o las fechas de inicio y finalización) de un 'trimestre' arbitrario en Luxon.

Por ejemplo, supongamos que quiero las fechas de inicio y finalización del tercer trimestre sabiendo solo el trimestre:

 const quarterInQuestion = 3; const startDateOfQuarter = DateTime.fromFormat(quarterInQuestion.toString(), 'q');

Esto me dará la fecha de inicio del trimestre, pero ¿cómo puedo obtener también la fecha de finalización? He investigado Duraciones e Intervalos, pero parece que todavía no puedo hacer que nada funcione.

¡Muchas gracias!

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

0

Creo que desea el método endOf , al que puede pasar el período que desea que finalice a partir de una fecha.

 const startDateOfQuarter = DateTime.fromFormat('3', 'q'); const endDateOfQuarter = startDateOfQuarter.endOf('quarter')
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!