Bradford1802
Bradford1802
DDeno
Created by Bradford1802 on 7/25/2023 in #help
Dates don't increment correctly
put a work around in place and it works. Strangely this only occurs for dates in Sep and Oct for years between 1994 - 2024. function addDay(date, days) { const newDate = new Date(date) newDate.setDate(newDate.getDate() + days) const checkDate = newDate.toISOString().substring(0, 10) if (checkDate === date) { newDate.setDate(newDate.getDate() + days + 1) return newDate.toISOString().substring(0, 10) } else { return newDate.toISOString().substring(0, 10) } }
3 replies