Comment on Fix date-handling bug when today’s date is later than the target monthComments−cranium2yI tried to replicate the bug only to find out the months are 0-indexed (jan = 0) so the example should use `setMonth(1)`.I must say I'd prefer getting an exception rather than a silent roll-over any day of the week – pun intended.
Comments
I tried to replicate the bug only to find out the months are 0-indexed (jan = 0) so the example should use `setMonth(1)`.
I must say I'd prefer getting an exception rather than a silent roll-over any day of the week – pun intended.