0
SetUTCMonth returns weird result
When the current date is 31st of any month , setUTC date is jumping to next to next month . Example : Var cdate = new Date(‘August 31, 2018’) ; cdate.setUTCMonth(8); Now try to getUTCMonth(9) and check .. it is returning October .
2 ответов
+ 1
September 2018 have not a 31th day then js make your date like you want increment by one day (going to first october)
0
when i use setUTCyear(x,y,z) then it is returning fine ..