minus-squaregen/Eric@iusearchlinux.fyitoProgrammer Humor@lemmy.ml•If you run this JavaScript function on the 31st of a month, the result will be a month off. The best part is that this is the intended behvaior. JavaScript is a cursed language.linkfedilinkarrow-up9·edit-21 year agodate.setDate(1); Problem solved. linkfedilink
date.setDate(1);
Problem solved.