Logger.log(Utilities.formatDate(day, timeZone, "dd.MM.YYYY"));//return 01.01.2021
Logger.log(Utilities.formatDate(yesterday, timeZone, "dd.MM.YYYY"));//return 31.12.2021
The script then sets the last day of the year, but the year is incorrect!
Please, how can I solve this?
Thank you sorry for by bad English