<commit_before><!-- hide script from old browsers

/**
 * Common code for the Marching Band Attendance Mobile App
 * 
 * @author <NAME>, <NAME>
 * 
 * Latest Rev: 3-3-12
 * 
 * standard key for localStorage: prepend firstname lastname netID date startTime endTime rank
 * rank is a 6 digit number with leading 0s
 */
var absentPrependPerformance = "absentStudentPerformance";
var absentPrependRehearsal = "absentStudentRehearsal";
var rehearsalPrepend = "storedRehearsal";
var performancePrepend = "storedPerformance";
var tardyPrepend = "tardyStudent";
var studentPrepend = "studentRecord";
var loginPrepend = "storedLogin";

//debug enable thingy
var loginDebug = true;
var debug = true;


/**
 * Makes browser go back (same as hitting browser's back button
 * @author <NAME>
 * @date 3/22/12
 */
function goBack()
{
	window.history.back()
}

/**
 * Determines if a substring (sub) is contained within a string (str)
 * 
 * @author <NAME>
 */
function stringContains(sub, str) {            
	return str.indexOf(sub) !== -1;
}


/**
 * Returns today's date in format YYYY-MM-DD where number less than 10 are
 * preceeded by 0
 * 
 * @return Date in specified format
 * 
 * @author <NAME>, <NAME>
 */
function dateToday() {
	var d = new Date();
	var month = d.getMonth()+1;
	var date = d.getDate();
	// add 0 for sortability
	if(parseInt(month,10)<10)
		month = "0"+month;
	if(parseInt(date,10)<10)
		date = "0"+date;
	return d.getFullYear()+"-"+month+"-"+date;
}

/**
 * Returns the current time in 24 hour format: HHMM
 * 
 * @return The time in the specified format
 * 
 * @author <NAME>, <NAME>
 */
function timeNow() {
	var d = new Date();
	var hours = d.getHours();
	var minutes = d.getMinutes();
	// add 0 for sortability
	if(parseInt(hours,10)<10)
		hours = "0"+hours;
	if(parseInt(minutes,10)<10)
		minutes = "0"+minutes;
	return hours+minutes;
} 

/**
 * This functions returns the current time in 12 hour format: HH:MM am/pm
 * 
 * @return The time in the specified format
 * 
 * @author <NAME>
 */
function twelveHourTimeNow(){
	var d = new Date()
	var hours = d.getHours();
	var ampm;
	// decide if am or pm
	if((parseInt(hours,10)) < 12)
		ampm = "am";
	else
		ampm = "pm";
	// use 12 for 0, else just mod the time by 12 to get the hours
	if(parseInt(hours,10) == 0 || parseInt(hours,10) == 12)
		hours = 12;
	else
		hours = parseInt(hours,10)%12;
	var minutes = d.getMinutes();
	// add 0 for sortability<commit_msg>Fixed stuff with the Tardy things<commit_after><!-- hide script from old browsers

/**
 * Common code for the Marching Band Attendance Mobile App
 * 
 * @author <NAME>, <NAME>
 * 
 * Latest Rev: 3-3-12
 * 
 * standard key for localStorage: prepend firstname lastname netID date startTime endTime rank
 * rank is a 6 digit number with leading 0s
 */
var absentPrependPerformance = "absentStudentPerformance";
var absentPrependRehearsal = "absentStudentRehearsal";
var rehearsalPrepend = "storedRehearsal";
var performancePrepend = "storedPerformance";
var tardyPrepend = "tardyStudent";
var studentPrepend = "studentRecord";
var loginPrepend = "storedLogin";

//debug enable thingy
var loginDebug = true;
var debug = true;


/**
 * Makes browser go back (same as hitting browser's back button
 * @author <NAME>
 * @date 3/22/12
 */
function goBack()
{
	window.history.back()
}

/**
 * Determines if a substring (sub) is contained within a string (str)
 * 
 * @author <NAME>
 */
function stringContains(sub, str) {            
	return str.indexOf(sub) !== -1;
}


/**
 * Returns today's date in format YYYY-MM-DD where number less than 10 are
 * preceeded by 0
 * 
 * @return Date in specified format
 * 
 * @author <NAME>, <NAME>
 */
function dateToday() {
	var d = new Date();
	var month = d.getMonth()+1;
	var date = d.getDate();
	// add 0 for sortability
	if(parseInt(month,10)<10)
		month = "0"+month;
	if(parseInt(date,10)<10)
		date = "0"+date;
	return d.getFullYear()+"-"+month+"-"+date;
}

/**
 * Returns the current time in 24 hour format: HHMM
 * 
 * @return The time in the specified format
 * 
 * @author <NAME>, <NAME>
 */
function timeNow() {
	var d = new Date();
	var hours = d.getHours();
	var minutes = d.getMinutes();
	// add 0 for sortability
	if(parseInt(hours,10)<10)
		hours = "0"+hours;
	if(parseInt(minutes,10)<10)
		minutes = "0"+minutes;
	return ""+hours+minutes;
} 

/**
 * This functions returns the current time in 12 hour format: HH:MM am/pm
 * 
 * @return The time in the specified format
 * 
 * @author <NAME>
 */
function twelveHourTimeNow(){
	var d = new Date()
	var hours = d.getHours();
	var ampm;
	// decide if am or pm
	if((parseInt(hours,10)) < 12)
		ampm = "am";
	else
		ampm = "pm";
	// use 12 for 0, else just mod the time by 12 to get the hours
	if(parseInt(hours,10) == 0 || parseInt(hours,10) == 12)
		hours = 12;
	else
		hours = parseInt(hours,10)%12;
	var minutes = d.getMinutes();
	// add 0 for sortability
{'fraction_non_alphanumeric': 0.1378251075158714, 'fraction_numerical': 0.02662297767765718, 'mean_word_length': 3.7142857142857144, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 21, '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': '6811727', 'n_tokens_mistral': 1823, 'n_tokens_neox': 1655, 'n_words': 550}