dayjs.locale("fr"); async function getDaysInMonth(month, year) { const daysInMonth = dayjs(new Date(year, month, 0)).daysInMonth(); const days = []; for (let day = 1; day <= daysInMonth; day++) { const currentDay = dayjs(new Date(year, month - 1, day)); days.push(currentDay.format("DD-MM-YYYY")); } return days; } function getEvents(monthNumb) { const myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer " + mapadoToken); const requestOptions = { method: "GET", headers: myHeaders, redirect: "follow", }; const url = "https://ticketing.mapado.net/v1/event_dates?itemsPerPage=31&contract=1941&after=2024-10-01&before=2024-11-01&order=asc&fields=startDate,bookableStock,ticketing{@id,title,firstFutureEventDateStartDate,isOnSale,minisite{domain,online,slug,name},venue{@id,name,seatingName,address,zipCode,city,countryCode,timezone}}"; }