<commit_before>$(function(){
  attachListeners();
  
});

function attachListeners() {
  
}
//<% @meeting.notes.each do |n| %>
//  <h4><%=n.author.name%>: <%=n.content%> | <% if n.author == current_user %> <%=link_to "Edit this Note",  edit_team_meeting_note_path(@meeting.team, @meeting, n)%> | <%=link_to "Delete this Note", note_path(n), method: :delete%> <%end%></h4>
//<%end%>
function nextMeeting(event) {
  event.preventDefault();
  var nextId = parseInt($(".js-next").attr("data-id")) + 1;
  var teamId = parseInt($(".js-next").attr("data-teamid"));
  $.get("/teams/" + teamId + "/meetings/" + nextId + ".json", function(data) {
    var meeting = data;
    console.log(data);
    $("#meetingTeam").html("Team: " + meeting["team_name"]);
    $("#meetingDate").html("Date: " + meeting["time"]);
    $("#meetingTime").html("Time: " + meeting["time"]);
    $("#meetingLocation").html("Location: " + meeting["location"]);
    $(".js-next").attr("data-id", meeting["id"]);
  });
}
// <h3 id="meetingDate">Date: <%= format_date(@meeting.time) %></h3>
// <h3 id="meetingTime">Time: <%= format_time(@meeting.time) %></h3>

function showNotes() {
  //var getting = $.get('/games');
//     
//  getting.done(function(data) {
//    var games = data["games"];
//    var array = "";
//    for (var i = 0; i < games.length; i++) {
//      array += `<p data-gameid="${games[i]["id"]}">` + "ID: " + `${games[i]["id"]}` + "  " + "State: " + `${games[i]["state"]}` + "</p>";
//    }
//    $("#games").html(array);<commit_msg>build function to correctly format date (was originally a Ruby helper method)<commit_after>$(function(){
  attachListeners();
  
});

function attachListeners() {
  
}

function formatDate(date) {
  var options = {}
  options.timeZone = 'UTC';
  return date.toLocaleDateString("en-US", options);
}
//<% @meeting.notes.each do |n| %>
//  <h4><%=n.author.name%>: <%=n.content%> | <% if n.author == current_user %> <%=link_to "Edit this Note",  edit_team_meeting_note_path(@meeting.team, @meeting, n)%> | <%=link_to "Delete this Note", note_path(n), method: :delete%> <%end%></h4>
//<%end%>
function nextMeeting(event) {
  event.preventDefault();
  var nextId = parseInt($(".js-next").attr("data-id")) + 1;
  var teamId = parseInt($(".js-next").attr("data-teamid"));
  $.get("/teams/" + teamId + "/meetings/" + nextId + ".json", function(data) {
    var meeting = data;
    var date = new Date(meeting["time"]);
    console.log(data);
    $("#meetingTeam").html("Team: " + meeting["team_name"] );
    $("#meetingDate").html("Date: " + formatDate(date));
    $("#meetingTime").html("Time: " + "<%= format_time(" + meeting["time"]+ ") %>");
    $("#meetingLocation").html("Location: " + meeting["location"]);
    $(".js-next").attr("data-id", meeting["id"]);
  });
}
// <h3 id="meetingDate">Date: <%= format_date(@meeting.time) %></h3>
// <h3 id="meetingTime">Time: <%= format_time(@meeting.time) %></h3>

function showNotes() {
  //var getting = $.get('/games');
//     
//  getting.done(function(data) {
//    var games = data["games"];
//    var array = "";
//    for (var i = 0; i < games.length; i++) {
//      array += `<p data-gameid="${games[i]["id"]}">` + "ID: " + `${games[i]["id"]}` + "  " + "State: " + `${games[i]["state"]}` + "</p>";
//    }
//    $("#games").html(array);
{'fraction_non_alphanumeric': 0.27283763277693474, 'fraction_numerical': 0.004855842185128983, 'mean_word_length': 3.971342383107089, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 40, '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': '3496914', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1201, 'n_words': 210}