var check = new Date(parts,parts-1,parts);
if ( check.getMonth() != Number(parts)
*THINK* about that for a minute.
You supply a month that is parts-1
And then you TEST for the month being parts
Does that really make a lick of sense?
Anyway, night-night time again.