For a few days, I have had a problem with the date processed by JS, which would try to make the year jumps forward. A bit of sample code below.
Inicjal date in HTML 'Jan 19 2022'
var dateYear = $(this).attr("dateYear");
console.log('dateYear ' + dateYear); // dateYear 2022
var dateMonth = $(this).attr("dateMonth");
console.log('dateMonth ' + dateMonth); // dateMonth 12
var dateDay = $(this).attr("dateDay");
console.log('dateDay ' + dateDay); // dateDay 19
var myDate = new Date(dateYear, dateMonth, dateDay);
console.log('myDate ' + myDate); // myDate Thu Jan 19 2023 00:00:00 GMT+0000 (Greenwich Mean Time)
Even if it subtracts one index from a month, but the year jump to 2023, if the index of the month remains unchanged teddy data will be 'Feb 19 2022';
What could it be for two years there was no problem with the date.