<commit_before>/**
 *	The Events module allows for the creation of various custom categories and the 
 *	creation of multiple events (timestamps) within each category. Authentication
 *	and data storage are provided by Firebase.
 *
 *	Created: August 10, 2015
 * 	Author: <NAME>
 */
var Events = (function() {
	var dataRef = new Firebase("https://flickering-torch-7386.firebaseio.com/");
	var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
	
	function toDateInputValue() {
		var local = new Date();
		local.setMinutes(local.getMinutes() - local.getTimezoneOffset());
		return local.toJSON().slice(0,10);
	};
	
	function toTimeInputValue() {
		var local = new Date();
		local.setMinutes(local.getMinutes() - local.getTimezoneOffset());
		local = local.toJSON().slice(11);
		return local.split(".")[0];
	};
	
	function translateColor(colorId) {
		var color = '';
		switch (colorId) {
			case "1":
				color = "red";
				break;
			case "2":
				color = "orange";
				break;
			case "3":
				color = "yellow";
				break;
			case "4":
				color = "green";
				break;
			case "5":
				color = "blue";
				break;
			case "6":
				color = "purple";
				break;
			default:
				color = "blue";
		}
		return color;
	};
	
	function formatDate(timestamp) {
		var arr = timestamp.split(/[- :]/),
			date = new Date(arr[0], arr[1]-1, arr[2], arr[3], arr[4]),
			today = new Date(),
			dateString = "";
			
			alert(timestamp);
			alert(date);<commit_msg>testing date formatting<commit_after>/**
 *	The Events module allows for the creation of various custom categories and the 
 *	creation of multiple events (timestamps) within each category. Authentication
 *	and data storage are provided by Firebase.
 *
 *	Created: August 10, 2015
 * 	Author: <NAME>
 */
var Events = (function() {
	var dataRef = new Firebase("https://flickering-torch-7386.firebaseio.com/");
	var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
	
	function toDateInputValue() {
		var local = new Date();
		local.setMinutes(local.getMinutes() - local.getTimezoneOffset());
		return local.toJSON().slice(0,10);
	};
	
	function toTimeInputValue() {
		var local = new Date();
		local.setMinutes(local.getMinutes() - local.getTimezoneOffset());
		local = local.toJSON().slice(11);
		return local.split(".")[0];
	};
	
	function translateColor(colorId) {
		var color = '';
		switch (colorId) {
			case "1":
				color = "red";
				break;
			case "2":
				color = "orange";
				break;
			case "3":
				color = "yellow";
				break;
			case "4":
				color = "green";
				break;
			case "5":
				color = "blue";
				break;
			case "6":
				color = "purple";
				break;
			default:
				color = "blue";
		}
		return color;
	};
	
	function formatDate(timestamp) {
		var arr = timestamp.split(/[- :]/),
			date = new Date(arr[0], arr[1]-1, arr[2], arr[3], arr[4]),
			today = new Date(),
			dateString = "";
{'fraction_non_alphanumeric': 0.17025505134150382, 'fraction_numerical': 0.018549188473004307, 'mean_word_length': 3.383164005805515, 'pattern_counts': {'":': 12, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4567389', 'n_tokens_mistral': 1216, 'n_tokens_neox': 995, 'n_words': 275}