<commit_before>// GET /eventos/:eventId/calendar

var calendar = [
	{
		"title" : "Inauguracion",
		"allDay" : false,
		"start" : "2015-11-04T12:00:00",
		"end": "2015-11-04T16:00:00"
	},
	{
		"title" : "Cena",
		"allDay" : false,
		"start" : "2015-11-04T19:00:00",
		"end": "2015-11-04T22:00:00"
	}
];


function gotoStartDate(events){
	var ev_start = events[0].start;

	var ev_end = events[0];

	for (var i = 1; i < events.length; i++) {
		ev_end = (events[i] > ev_end) ? events[i]:ev_end;
	};


	var todate = new Date();
	var today = todate.toJSON();


	if(ev_start >= today){

		$('#calendar').fullCalendar('gotoDate', ev_start);

	} else if( ev_end >= today){

		$('#calendar').fullCalendar('gotoDate', today);

	} else {<commit_msg>arreglar gotodate<commit_after>// GET /eventos/:eventId/calendar

var calendar = [
	{
		"title" : "Inauguracion",
		"allDay" : false,
		"start" : "2015-11-14T12:00:00",
		"end": "2015-11-14T16:00:00"
	},
	{
		"title" : "Cena",
		"allDay" : false,
		"start" : "2015-11-14T19:00:00",
		"end": "2015-11-14T22:00:00"
	}
];


function gotoStartDate(events){
	var ev_start = events[0].start;

	var ev_end = events[0].end;
	// alert(ev_end);

	for (var i = 1; i < events.length; i++) {
		ev_end = (events[i].end > ev_end) ? events[i].end:ev_end;
	};


	var todate = new Date();
	var today = todate.toJSON();


	if(ev_start >= today){

	

		$('#calendar').fullCalendar('gotoDate', ev_start);

	} else if( ev_end >= today){


		$('#calendar').fullCalendar('gotoDate', today);

	} else {

{'fraction_non_alphanumeric': 0.21503957783641162, 'fraction_numerical': 0.07783641160949868, 'mean_word_length': 3.7554858934169277, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 9, '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': '1969466', 'n_tokens_mistral': 747, 'n_tokens_neox': 640, 'n_words': 118}