<commit_before>Date.prototype.getMonthName = function(lang) {
    lang = lang && (lang in Date.locale) ? lang : 'en';
    return Date.locale[lang].month_names[this.getMonth()];
};

Date.prototype.getMonthNameShort = function(lang) {
    lang = lang && (lang in Date.locale) ? lang : 'en';
    return Date.locale[lang].month_names_short[this.getMonth()];
};

Date.locale = {
    en: {
       month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
       month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    }
};

function loadevents(url, dest) {
	$.getJSON(url, function (json) {
    //console.log(json);
    var needsHeading = true;
    var lastFuture = true;
    var lastYearCat = 0;
	    $.each(json, function (i, ev) {
	        //alert(fb.result);
	        //var datetime = ev.Year + "-" + ev.Month + "-" + ev.Day;
	        var evdate = new Date(+("20" + ev.Year), +ev.Month, +ev.Day);
	        var today = new Date();

	        if (evdate > today) {
	        	if (needsHeading) {
	        		dest.append($("<h1>Future Special Events</h1>"));
	        		needsHeading = false;
	        	}
	        } else {
	        	if (lastFuture) {
	        		dest.append($("<h1>Past Special Events</h1>"));
	        		lastFuture = false;
	        	}
	        	if (lastYearCat != ev.Year) {
	        		dest.append($("<h1>20" + ev.Year + "</h1>"));
	        		lastYearCat = ev.Year;
	        	}
	        }
	       	dest.append(
	        	$('<li>').append(
	        		$('<time>').append(
	        				$('<span>').attr('class', 'day').text(ev.Day)
	        			).append(
	        				$('<span>').attr('class', 'month').text(evdate.getMonthNameShort())
	        			)
	        	).append(
	        		$('<div>').attr('class', 'info').append(
	        				$('<h2>').attr('class', 'title').text(ev.Title)
	        			).append(
	        				$('<p>').attr('class', 'loc').text(ev.Location)
	        			)
	        	).append(
	        				$('<div>').attr('class', 'desc').text(ev.Description)
	        			)
	        	);
	    });
	});
}<commit_msg>Fixed date parser<commit_after>Date.prototype.getMonthName = function(lang) {
    lang = lang && (lang in Date.locale) ? lang : 'en';
    return Date.locale[lang].month_names[this.getMonth()];
};

Date.prototype.getMonthNameShort = function(lang) {
    lang = lang && (lang in Date.locale) ? lang : 'en';
    return Date.locale[lang].month_names_short[this.getMonth()];
};

Date.locale = {
    en: {
       month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
       month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    }
};

function loadevents(url, dest) {
	$.getJSON(url, function (json) {
    //console.log(json);
    var needsHeading = true;
    var lastFuture = true;
    var lastYearCat = 0;
	    $.each(json, function (i, ev) {
	        //alert(fb.result);
	        //var datetime = ev.Year + "-" + ev.Month + "-" + ev.Day;
	        var evdate = new Date(+("20" + ev.Year), (+ev.Month) - 1, +ev.Day);
	        var today = new Date();

	        if (evdate > today) {
	        	if (needsHeading) {
	        		dest.append($("<h1>Future Special Events</h1>"));
	        		needsHeading = false;
	        	}
	        } else {
	        	if (lastFuture) {
	        		dest.append($("<h1>Past Special Events</h1>"));
	        		lastFuture = false;
	        	}
	        	if (lastYearCat != ev.Year) {
	        		dest.append($("<h1>20" + ev.Year + "</h1>"));
	        		lastYearCat = ev.Year;
	        	}
	        }
	       	dest.append(
	        	$('<li>').append(
	        		$('<time>').append(
	        				$('<span>').attr('class', 'day').text(ev.Day)
	        			).append(
	        				$('<span>').attr('class', 'month').text(evdate.getMonthNameShort())
	        			)
	        	).append(
	        		$('<div>').attr('class', 'info').append(
	        				$('<h2>').attr('class', 'title').text(ev.Title)
	        			).append(
	        				$('<p>').attr('class', 'loc').text(ev.Location)
	        			)
	        	).append(
	        				$('<div>').attr('class', 'desc').text(ev.Description)
	        			)
	        	);
	    });
	});
}
{'fraction_non_alphanumeric': 0.21114708603145235, 'fraction_numerical': 0.00578168362627197, 'mean_word_length': 2.0372191011235956, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '719056', 'n_tokens_mistral': 1635, 'n_tokens_neox': 1476, 'n_words': 267}