<commit_before><script type="text/javascript"><!--

$(function() {

  var age = <%= @kata.age %>;
  var seconds = age % 60;
  var minutes = Math.floor((age / 60) % 60);
  var hours   = Math.floor((age / (60*60)) % 24);
  var days    = Math.floor(age / (60*60*24));

  var zeroed = function(n) {
    return ('00' + n).slice(-2);
  };
  var sep = '&thinsp;:&thinsp;';

  if (days > 0) {
    $('#days-label').html("days" + sep);
    $('#days').text(zeroed(days));
  }
  if (days > 0 || hours > 0) {
    $('#hours-label').html("hours" + sep);
    $('#hours').text(zeroed(hours));
  }
  if (days > 0 || hours > 0 || minutes > 0) {
    $('#minutes-label').html("minutes" + sep);
    $('#minutes').text(zeroed(minutes));
  }
  if (days > 0 || hours > 0 || minutes > 0 || seconds > 0) {
    $('#seconds-label').html("seconds" + sep);
    $('#seconds').text(zeroed(seconds));
  }

});

//--></script>

<table id="age-container">
  <tr>
    <td id="days-label" class="align-right"></td>
    <td id="days" class="align-left"></td>
  </tr>
  <tr>
    <td id="hours-label" class="align-right"></td><commit_msg>refactoring<commit_after><script type="text/javascript"><!--

$(function() {

  var age = <%= @kata.age %>; // in seconds

  var sep = '&thinsp;:&thinsp;';

  var zeroed = function(n) {
    return ('00' + n).slice(-2);
  };
  
  var hoursPerDay = 24;
  var minutesPerHour = 60  
  var secondsPerMinute = 60;
  var secondsPerHour = secondsPerMinute * minutesPerHour;
  var secondsPerDay = secondsPerHour * hoursPerDay;

  if (age > secondsPerDay) {
    var days = Math.floor(age / secondsPerDay);
    $('#days-label').html("days" + sep);
    $('#days').text(zeroed(days));
  }
  if (age > secondsPerHour) {
    var hours = Math.floor((age / secondsPerHour) % hoursPerDay);
    $('#hours-label').html("hours" + sep);
    $('#hours').text(zeroed(hours));
  }
  if (age > secondsPerMinute) {
    var minutes = Math.floor((age / secondsPerMinute) % minutesPerHour);    
    $('#minutes-label').html("minutes" + sep);
    $('#minutes').text(zeroed(minutes));
  }
  if (age > 0) {
    var seconds = age % secondsPerMinute;    
    $('#seconds-label').html("seconds" + sep);
    $('#seconds').text(zeroed(seconds));
  }

});

//--></script>

<table id="age-container">
  <tr>
    <td id="days-label" class="align-right"></td>
    <td id="days" class="align-left"></td>
  </tr>
  <tr>
    <td id="hours-label" class="align-right"></td>
{'fraction_non_alphanumeric': 0.234420140321915, 'fraction_numerical': 0.01692117210070161, 'mean_word_length': 3.260105448154657, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 45, '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': '2115603', 'n_tokens_mistral': 937, 'n_tokens_neox': 889, 'n_words': 174}