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 cargos en Stripe para la fecha de ayer y del mes actual

Estoy tratando de obtener los cargos de la franja de ayer y del mes actual, según el estado de cuenta del cambio. Sin embargo, creo que tengo algo mal. No creo que esté construyendo mis objetos de fecha como deben ser. Esto está en JavaScript:

 const getEpochValueForTimeRangeStart = function getEpochValueForTimeRangeStart(range) { const now = new Date(); let returnValue; switch(range) { case 'ALL': returnValue = new Date(0); break; case 'TODAY': returnValue = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0); break; case 'YESTERDAY': returnValue = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1, 0, 0, 0, 0); break; case 'MONTH': returnValue = new Date(now.getFullYear(), now.getMonth() - 1, 0, 0, 0, 0); break; } return Math.floor(returnValue.getTime() / 1000); }

Los 'TODOS' y 'HOY' funcionan como se esperaba, pero los otros dos ('AYER' y 'MES') no funcionan como se esperaba. ¿Qué estoy haciendo mal aquí?

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!