if (i === 1 || i === 2 || i === 3 || i === 4 || i === 5 || i === 6 || i === 7 || i === 8 || i === 9 || i === 10){
 return true;
}
By foxy, 2017-12-13 23:25:17
if(year%100 === 79 ||
year%100 === 90 ||
year%100 === 1 ||
year%100 === 7 ||
year%100 === 18) {
	if(month === 1) { while(day%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 2) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 28);}}
	if(month === 3) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 4) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 5) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 6) { while((day + 4)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 7) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 8) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 9) { while((day + 5)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 10) { while(day%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 11) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 12) { while((day + 5)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
}
if(year2%100 === 79 ||
year2%100 === 90 ||
year2%100 === 1 ||
year2%100 === 7 ||
year2%100 === 18) {
	if(month2 === 1) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 2) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 28);}}
	if(month2 === 3) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 4) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 5) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 6) { while((day2 + 4)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 7) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 8) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 9) { while((day2 + 5)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 10) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 11) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 12) { while((day2 + 5)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
}
if(year3%100 === 79 ||
year3%100 === 90 ||
year3%100 === 1 ||
year3%100 === 7 ||
year3%100 === 18) {
	if(month3 === 1) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 2) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 28);}}
	if(month3 === 3) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 4) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 5) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 6) { while((day3 + 4)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 7) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 8) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 9) { while((day3 + 5)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 10) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 11) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 12) { while((day3 + 5)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
}
if(year%100 === 96) {
	if(month === 1) { while(day%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 2) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 29);}}
	if(month === 3) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 4) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 5) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 6) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 7) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 8) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 9) { while((day + 4)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 10) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 11) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 12) { while((day + 4)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
}
if(year2%100 === 96) {
	if(month2 === 1) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 2) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 29);}}
	if(month2 === 3) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 4) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 5) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 6) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 7) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 8) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 9) { while((day2 + 4)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 10) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 11) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 12) { while((day2 + 4)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
}
if(year3%100 === 96) {
	if(month3 === 1) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 2) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 29);}}
	if(month3 === 3) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 4) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 5) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 6) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 7) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 8) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 9) { while((day3 + 4)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 10) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 11) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 12) { while((day3 + 4)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
}
if(year%100 === 85 ||
year%100 === 91 ||
year%100 === 2 ||
year%100 === 13 ||
year%100 === 19) {
	if(month === 1) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 2) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 28);}}
	if(month === 3) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 4) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 5) { while(day%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 6) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 7) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 8) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 9) { while((day + 4)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 10) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 11) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 12) { while((day + 4)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
}
if(year2%100 === 85 ||
year2%100 === 91 ||
year2%100 === 2 ||
year2%100 === 13 ||
year2%100 === 19) {
	if(month2 === 1) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 2) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 28);}}
	if(month2 === 3) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 4) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 5) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 6) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 7) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 8) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 9) { while((day2 + 4)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 10) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 11) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 12) { while((day2 + 4)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
}
if(year3%100 === 85 ||
year3%100 === 91 ||
year3%100 === 2 ||
year3%100 === 13 ||
year3%100 === 19) {
	if(month3 === 1) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 2) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 28);}}
	if(month3 === 3) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 4) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 5) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 6) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 7) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 8) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 9) { while((day3 + 4)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 10) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 11) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 12) { while((day3 + 4)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
}
if(year%100 === 80 ||
year%100 === 8) {
	if(month === 1) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 2) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 29);}}
	if(month === 3) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 4) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 5) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 6) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 7) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 8) { while(day%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 9) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 10) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 11) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 12) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
}
if(year2%100 === 80 ||
year2%100 === 8) {
	if(month2 === 1) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 2) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 29);}}
	if(month2 === 3) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 4) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 5) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 6) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 7) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 8) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 9) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 10) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 11) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 12) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
}
if(year3%100 === 80 ||
year3%100 === 8) {
	if(month3 === 1) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 2) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 29);}}
	if(month3 === 3) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 4) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 5) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 6) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 7) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 8) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 9) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 10) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 11) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 12) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
}
if(year%100 === 86 ||
year%100 === 97 ||
year%100 === 3 ||
year%100 === 14) {
	if(month === 1) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 2) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 28);}}
	if(month === 3) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 4) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 5) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 6) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 7) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 8) { while(day%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 9) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 10) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 11) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 12) { while((day + 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
}
if(year%100 === 92) {
	if(month === 1) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 2) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 29);}}
	if(month === 3) { while(day%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 4) { while((day - 4)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 5) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 6) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 7) { while((day - 4)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 8) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 9) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 10) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 11) { while(day%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 12) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
}
if(year2%100 === 86 ||
year2%100 === 97 ||
year2%100 === 3 ||
year2%100 === 14) {
	if(month2 === 1) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 2) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 28);}}
	if(month2 === 3) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 4) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 5) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 6) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 7) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 8) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 9) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 10) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 11) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 12) { while((day2 + 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
}
if(year2%100 === 92) {
	if(month2 === 1) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 2) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 29);}}
	if(month2 === 3) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 4) { while((day2 - 4)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 5) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 6) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 7) { while((day2 - 4)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 8) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 9) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 10) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 11) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 12) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
}
if(year3%100 === 86 ||
year3%100 === 97 ||
year3%100 === 3 ||
year3%100 === 14) {
	if(month3 === 1) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 2) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 28);}}
	if(month3 === 3) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 4) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 5) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 6) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 7) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 8) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 9) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 10) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 11) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 12) { while((day3 + 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
}
if(year3%100 === 92) {
	if(month3 === 1) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 2) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 29);}}
	if(month3 === 3) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 4) { while((day3 - 4)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 5) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 6) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 7) { while((day3 - 4)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 8) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 9) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 10) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 11) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 12) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
}
if(year%100 === 81 ||
year%100 === 87 ||
year%100 === 98 ||
year%100 === 9 ||
year%100 === 17) {
	if(month === 1) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 2) { while(day%7 ===0) {day=Math.ceil(Math.random() * 28);}}
	if(month === 3) { while(day%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 4) { while((day - 4)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 5) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 6) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 7) { while((day - 4)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 8) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 9) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 10) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 11) { while(day%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 12) { while((day + 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
}
if(year%100 === 4) {
	if(month === 1) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 2) { while(day%7 ===0) {day=Math.ceil(Math.random() * 29);}}
	if(month === 3) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 4) { while((day - 5)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 5) { while((day - 3)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 6) { while(day%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 7) { while((day - 5)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 8) { while((day - 2)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 9) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 10) { while((day - 4)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
	if(month === 11) { while((day - 1)%7 ===0) {day=Math.ceil(Math.random() * 30);}}
	if(month === 12) { while((day + 1)%7 ===0) {day=Math.ceil(Math.random() * 31);}}
}
if(year2%100 === 81 ||
year2%100 === 87 ||
year2%100 === 98 ||
year2%100 === 9 ||
year2%100 === 17) {
	if(month2 === 1) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 2) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 28);}}
	if(month2 === 3) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 4) { while((day2 - 4)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 5) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 6) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 7) { while((day2 - 4)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 8) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 9) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 10) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 11) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 12) { while((day2 + 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
}
if(year2%100 === 4) {
	if(month2 === 1) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 2) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 29);}}
	if(month2 === 3) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 4) { while((day2 - 5)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 5) { while((day2 - 3)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 6) { while(day2%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 7) { while((day2 - 5)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 8) { while((day2 - 2)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 9) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 10) { while((day2 - 4)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
	if(month2 === 11) { while((day2 - 1)%7 ===0) {day2=Math.ceil(Math.random() * 30);}}
	if(month2 === 12) { while((day2 + 1)%7 ===0) {day2=Math.ceil(Math.random() * 31);}}
}
if(year3%100 === 81 ||
year3%100 === 87 ||
year3%100 === 98 ||
year3%100 === 9 ||
year3%100 === 17) {
	if(month3 === 1) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 2) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 28);}}
	if(month3 === 3) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 4) { while((day3 - 4)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 5) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 6) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 7) { while((day3 - 4)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 8) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 9) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 10) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 11) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 12) { while((day3 + 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
}
if(year3%100 === 4) {
	if(month3 === 1) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 2) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 29);}}
	if(month3 === 3) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 4) { while((day3 - 5)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 5) { while((day3 - 3)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 6) { while(day3%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 7) { while((day3 - 5)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 8) { while((day3 - 2)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 9) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 10) { while((day3 - 4)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
	if(month3 === 11) { while((day3 - 1)%7 ===0) {day3=Math.ceil(Math.random() * 30);}}
	if(month3 === 12) { while((day3 + 1)%7 ===0) {day3=Math.ceil(Math.random() * 31);}}
}
By Anonymous, 2021-06-22 15:46:00
function isAllowSearchLength(text) {
    return text.length > isNaN(parseInt(text, 10)) ? 1 : 0;
}
By Anonymous, 2018-01-24 12:02:46
let True = true
let False = false

使用Python的 True 和 False 在javascript

By AD, 2023-01-31 10:16:17
function urlREPLACER(dtTEXTVALUE){
    
    dtTEXTVALUE.indexOf('http://') != -1 && (dtTEXTVALUE = dtTEXTVALUE.replace('http://','')) && dtTEXTVALUE.indexOf('.aspx') == -1 && (dtTEXTVALUE += '.aspx');
    
    return dtTEXTVALUE;
}
By I'm glad, 2019-02-16 13:10:54
 public void updateCurrency() {
        LOGGER.info("Update currencies");
        var ok = false;

        try {
            getExchangeRatesMechanism(getExchangeRatesProcessor());
            ok = true;
        } catch (Exception exception) {
            LOGGER.error(exception.getMessage(), exception);
        }

        if (ok) {
            LOGGER.info("The currencies were updated successfully!");
        }
    }
By halogenUnit, 2022-09-29 13:31:58
var None = null;

if ({{ post.pk }} == None) {
    // reset to draft
    $("#id_status")[0].value = 1;
}
By Anonymous, 2016-11-18 19:08:07
const ITEM_COUNT = 100
let visibleItems = []
for (let i = 0; i < ITEM_COUNT; ++i) {
  visibleItems.push(false)
}

function showItem(index) {
  visibleItems = []
  for (let i = 0; i < ITEM_COUNT; ++i) {
    visibleItems.push(false)
  }
  visibleItems[index] = true
}

It was more or less like this. The guy had a collection of React components and wanted to show only one of them at a time. Instead of storing the index of the component to show at the moment, he decided that a boolean array would work much better. O(n) in runtime and space and null readability just because.

By Anonymous, 2019-12-07 11:59:58
'use strict'

// exports //

module.exports = Math.sqrt
By Igor, 2021-09-01 21:28:26
const handleBoolean = value => {
        switch (value) {
            case "true":
                return true;
            case true:
                return "true";
            case "false":
                return false;
            case false:
                return "false"
            default:
                return null;
        }
    }
By Anonymous, 2021-09-29 11:53:22
function downScaleCanvas(a, b) {
    var c = Math.ceil,
        d = Math.floor;
    if (!(1 > b) || !(0 < b)) throw "scale must be a positive number <1 ";
    var e = b * b,
        f = a.width,
        g = a.height,
        h = d(f * b),
        i = d(g * b),
        j = 0,
        k = 0,
        l = 0,
        m = 0,
        n = 0,
        o = 0,
        p = 0,
        q = 0,
        r = 0,
        s = 0,
        t = 0,
        u = 0,
        v = 0,
        x = 0,
        y = 0,
        z = !1,
        A = !1,
        B = a.getContext("2d").getImageData(0, 0, f, g).data,
        C = new Float32Array(3 * h * i),
        D = 0,
        E = 0,
        F = 0;
    for (k = 0; k < g; k++)
        for (n = k * b, r = 0 | n, o = 3 * r * h, A = r != (0 | n + b), A && (x = r + 1 - n, y = n + b - r - 1), j = 0; j < f; j++, l += 4) m = j * b, q = 0 | m, p = o + 3 * q, z = q != (0 | m + b), z && (u = q + 1 - m, v = m + b - q - 1), D = B[l], E = B[l + 1], F = B[l + 2], z || A ? z && !A ? (s = u * b, C[p] += D * s, C[p + 1] += E * s, C[p + 2] += F * s, t = v * b, C[p + 3] += D * t, C[p + 4] += E * t, C[p + 5] += F * t) : A && !z ? (s = x * b, C[p] += D * s, C[p + 1] += E * s, C[p + 2] += F * s, t = y * b, C[p + 3 * h] += D * t, C[p + 3 * h + 1] += E * t, C[p + 3 * h + 2] += F * t) : (s = u * x, C[p] += D * s, C[p + 1] += E * s, C[p + 2] += F * s, t = v * x, C[p + 3] += D * t, C[p + 4] += E * t, C[p + 5] += F * t, t = u * y, C[p + 3 * h] += D * t, C[p + 3 * h + 1] += E * t, C[p + 3 * h + 2] += F * t, t = v * y, C[p + 3 * h + 3] += D * t, C[p + 3 * h + 4] += E * t, C[p + 3 * h + 5] += F * t) : (C[p] += D * e, C[p + 1] += E * e, C[p + 2] += F * e);
    var G = document.createElement("canvas");
    G.width = h, G.height = i;
    var H = G.getContext("2d"),
        I = H.getImageData(0, 0, h, i),
        J = I.data,
        K = 0;
    for (l = 0, p = 0; K < h * i; l += 3, p += 4, K++) J[p] = c(C[l]), J[p + 1] = c(C[l + 1]), J[p + 2] = c(C[l + 2]), J[p + 3] = 255;
    return H.putImageData(I, 0, 0), G
}

dohhhhhh !!

By fotogena.co sonickseven, 2019-10-13 00:10:25
    self.isOptionsVisible = ko.computed(function() {
        if((self.type() == 'select') || (self.type() == 'multiselect') || (self.type() == 'radio') || (self.type() == 'checkbox') || (self.type() == 'upload')) {
            return true;
        }

        return false;
    }, this);

    self.isNameVisible = ko.computed(function() {
        if((self.type() == 'text') || (self.type() == 'textarea') || (self.type() == 'select') || (self.type() == 'multiselect') || (self.type() == 'radio') || (self.type() == 'checkbox') || (self.type() == 'upload')) {
            return true;
        }

        return false;
    }, this);

    self.isBeforeAfterImagesVisible = ko.computed(function() {
        if((self.type() == 'text') || (self.type() == 'textarea') || (self.type() == 'select') || (self.type() == 'multiselect') || (self.type() == 'radio') || (self.type() == 'checkbox') || (self.type() == 'upload')) {
            return true;
        }

        return false;
    }, this);

    self.isTooltipVisible = ko.computed(function() {
        if((self.type() == 'text') || (self.type() == 'textarea') || (self.type() == 'select') || (self.type() == 'multiselect') || (self.type() == 'radio') || (self.type() == 'checkbox') || (self.type() == 'upload')) {
            return true;
        }

        return false;
    }, this);

    self.isLabelVisible = ko.computed(function() {
        if((self.type() == 'text') || (self.type() == 'textarea') || (self.type() == 'select') || (self.type() == 'multiselect') || (self.type() == 'radio') || (self.type() == 'checkbox') || (self.type() == 'upload') || (self.type() == 'info')) {
            return true;
        }

        return false;
    }, this);

    self.isClassVisible = ko.computed(function() {
        if((self.type() == 'text') || (self.type() == 'textarea') || (self.type() == 'select') || (self.type() == 'multiselect') || (self.type() == 'radio') || (self.type() == 'checkbox') || (self.type() == 'upload')) {
            return true;
        }

        return false;
    }, this);

    self.isStyleVisible = ko.computed(function() {
        if((self.type() == 'text') || (self.type() == 'textarea') || (self.type() == 'select') || (self.type() == 'multiselect') || (self.type() == 'radio') || (self.type() == 'checkbox') || (self.type() == 'upload')) {
            return true;
        }

        return false;
    }, this);

object orientation overrated. let's check the fields in several places ...

By Dude, 2020-12-16 12:25:17
> var x = 3;
> '5' + x - x
50
> '5' - x + x
5 // Because fuck math

JS is simply. Oh, wait...

By mademan, 2015-11-18 13:50:39
if (currentDay.day() !== MONDAY) {
    do {
        currentDay = this.$moment(currentDay).subtract(1, 'days');
        days.unshift(currentDay);
    } while (currentDay.day() !== MONDAY);
}
By Anonymous, 2017-10-14 18:44:20
  $(".alarmBell").on("click", () => {

    let icon = $(".alarm-bell__icon")
    icon.attr('data', icon.attr('data') == 'images/icon/alarm-bell.svg' ? 'images/icon/alarm-bell-filled-new.svg' : 'images/icon/alarm-bell.svg');

    // $(".alarm-bell__icon").attr('data', function (index, data) {
    //   if (data == 'images/icon/alarm-bell-filled-new.svg') {
    //     return 'images/icon/alarm-bell.svg';
    //   } else if (data == 'images/icon/alarm-bell.svg') {
    //     return 'images/icon/alarm-bell-filled-new.svg';
    //   } else {
    //     return 'images/icon/alarm-bell.svg';
    //   }
    // });

  });

...after yet another icons change request

By Desperate Dev..., 2020-01-21 17:28:18