billboard-top-100.js
function yyyymmddDateFromMonthDayYearDate(monthDayYearDate) {
	var yyyy = monthDayYearDate.split(',')[1].trim();
	var dd = monthDayYearDate.split(' ')[1].split(',')[0];
	var mm = '';
	switch (monthDayYearDate.split(' ')[0]) {
		case 'January': 
			mm = '01';
			break;
		case 'February':
			mm = '02';
			break;
		case 'March':
			mm = '03';
			break;
		case 'April':
			mm = '04';
			break;
		case 'May':
			mm = '05';
			break;
		case 'June':
			mm = '06';
			break;
		case 'July':
			mm = '07';
			break;
		case 'August':
			mm = '08';
			break;
		case 'September':
			mm = '09';
			break;
		case 'October':
			mm = '10';
			break;
		case 'November':
			mm = '11';
			break;
		case 'December':
			mm = '12';
			break;
	}
	return yyyy + '-' + mm + '-' + dd;
}
function yyyymmddDateFromMonthDayYearDate(monthDayYearDate) {
	var yyyy = monthDayYearDate.split(',')[1].trim();
	var dd = monthDayYearDate.split(' ')[1].split(',')[0];
	var mm = '';
	switch (monthDayYearDate.split(' ')[0]) {
		case 'January': 
			mm = '01';
			break;
		case 'February':
			mm = '02';
			break;
		case 'March':
			mm = '03';
			break;
		case 'April':
			mm = '04';
			break;
		case 'May':
			mm = '05';
			break;
		case 'June':
			mm = '06';
			break;
		case 'July':
			mm = '07';
			break;
		case 'August':
			mm = '08';
			break;
		case 'September':
			mm = '09';
			break;
		case 'October':
			mm = '10';
			break;
		case 'November':
			mm = '11';
			break;
		case 'December':
			mm = '12';
			break;
	}
	return yyyy + '-' + mm + '-' + dd;
}
function yyyymmddDateFromMonthDayYearDate ( monthDayYearDate ) { var yyyy = monthDayYearDate . split ( ',' ) [ 1 ] . trim ( ) ; var dd = monthDayYearDate . split ( ' ' ) [ 1 ] . split ( ',' ) [ 0 ] ; var mm = '' ; switch ( monthDayYearDate . split ( ' ' ) [ 0 ] ) { case 'January' : mm = '01' ; break ; case 'February' : mm = '02' ; break ; case 'March' : mm = '03' ; break ; case 'April' : mm = '04' ; break ; case 'May' : mm = '05' ; break ; case 'June' : mm = '06' ; break ; case 'July' : mm = '07' ; break ; case 'August' : mm = '08' ; break ; case 'September' : mm = '09' ; break ; case 'October' : mm = '10' ; break ; case 'November' : mm = '11' ; break ; case 'December' : mm = '12' ; break ; } return yyyy + '-' + mm + '-' + dd ; }
Converts Month Day, Year date to YYYY-MM-DD date

@param {string} monthDayYearDate - The Month Day, Year date
@return {string} The YYYY-MM-DD date

@example

yyyymmddDateFromMonthDayYearDate("November 19, 2016") // 2016-11-19
Converts Month Day Year date to YYYY - MM - DD date