<commit_before>//Returns parsed array
function createClassArray(req)
{
  var classArray = [];
  //Iterate through every property in the query
  for(var property in req.query){
    //Once we reach the "e" property, there are no more class properties
    if(property == "e")
      break;
    else {
      //replacing the letters will tell us which class this is
      index = property.replace(/[a-z]/g,'');
      //replacing the numbers will give us the property type
      type = property.replace(/[0-9]/g,'');
      if(!classArray[index])
        classArray[index] = {};
      //Set the properties of our class array from the query's data
      classArray[index][type] = req.query[property];
    }
  }

  classArray.splice(0,1);

  //Debug
  //console.log(classArray);
  return classArray;
}

//Change datetime format from 20150902 to "2015-09-03T10:00:00.000-07:00"
function setDateTimeFormat(time, date) {
  if(!time || !date){
    console.log("Error formatting datetime - no time or date");
    return;
  }

  date = date.substring(0,4) + "-" + date.substring(4,6) + "-" + date.substring(6);
  time = time.substring(0,2) + ":" + time.substring(2);
  time = time + ":00.000-05:00";

  var dateTime = date + 'T' + time;

  // console.log(dateTime);
  return dateTime;
}

//Get weekday for start of classes
//Updated for spring
function getWeekDay(string){
    switch(string) {
      case 'Mon':
          return '20160912';<commit_msg>Fix timezone on insert<commit_after>//Returns parsed array
function createClassArray(req)
{
  var classArray = [];
  //Iterate through every property in the query
  for(var property in req.query){
    //Once we reach the "e" property, there are no more class properties
    if(property == "e")
      break;
    else {
      //replacing the letters will tell us which class this is
      index = property.replace(/[a-z]/g,'');
      //replacing the numbers will give us the property type
      type = property.replace(/[0-9]/g,'');
      if(!classArray[index])
        classArray[index] = {};
      //Set the properties of our class array from the query's data
      classArray[index][type] = req.query[property];
    }
  }

  classArray.splice(0,1);

  //Debug
  //console.log(classArray);
  return classArray;
}

//Change datetime format from 20150902 to "2015-09-03T10:00:00.000-07:00"
function setDateTimeFormat(time, date) {
  if(!time || !date){
    console.log("Error formatting datetime - no time or date");
    return;
  }

  date = date.substring(0,4) + "-" + date.substring(4,6) + "-" + date.substring(6);
  time = time.substring(0,2) + ":" + time.substring(2);
  time = time + ":00.000-04:00";

  var dateTime = date + 'T' + time;

  console.log(dateTime);
  return dateTime;
}

//Get weekday for start of classes
//Updated for spring
function getWeekDay(string){
    switch(string) {
      case 'Mon':
          return '20160912';
{'fraction_non_alphanumeric': 0.1438498957609451, 'fraction_numerical': 0.04030576789437109, 'mean_word_length': 3.0265734265734268, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '1016972', 'n_tokens_mistral': 984, 'n_tokens_neox': 909, 'n_words': 264}