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

830
Vistas
JavaScript - How to get holiday list of a specific year using Google Calendar API?

I am using Google API v3 for retrieving the holiday lists, here is how I use the API: https://www.googleapis.com/calendar/v3/calendars/en.usa%23holiday%40group.v.calendar.google.com/events?key=myAPIKey

It returns a list of holidays of its own way (some of them are 2021 and some of them are 2022), but I want to get a list of holidays of my own specific year. Like I pass the year 2021, then it will return all the holidays of 2021, similarly, if I pass 2022, then it will return 2022. But I have no idea how to pass a year parameter, or I have no idea whether Google Calendar allows passing such parameter for holidays.

Can anyone please help me?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

According to the Google API Docs https://developers.google.com/calendar/api/v3/reference

There is a timeMax and timeMin url param that accepts a date/time range:

Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin.

https://www.googleapis.com/calendar/v3/calendars/primary/events?q=timeMax=2021-06-03T10%3A00%3A00-07%3A00&timeMin=2011-06-03T10%3A00%3A00-07%3A00

Note: The : are url encoded to: %3A

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