<commit_before>$(document).ready(function(){
  localizeTime();
});

$(document).on('page:load', localizeTime);

function localizeTime(){
  $('.local-time').each(function() {
    // localize servertime of the record and make it a Date Object
    var now = new Date();
    var utcOffset = now.getTimezoneOffset() * 1000 * 60;
    var serverTime = $(this).text();
    var newTimeObject = new Date(serverTime);
    if (isNaN(newTimeObject.getFullYear())) {
      return;
    }
    var localizedTime = new Date(newTimeObject - utcOffset);

    //Get displayable data from the Date Object
    var year = localizedTime.getFullYear();
    var month = localizedTime.getMonth() + 1;
    var day = localizedTime.getDate();
    var hours = localizedTime.getHours();

    //Tweaks: 24hour clock to 12, add a leading 0 to minutes less than 10, etc.
    var ampm = hours >= 12 ? 'PM' : 'AM'
    hours = hours % 12;
    hours = hours ? hours : 12;
    var minutes = (localizedTime.getMinutes() < 10 ? '0' : '') + localizedTime.getMinutes();

    if ($(this).text() != "") {
      $(this).text(month + "/" + day + "/" + year + " " + hours + ":" + minutes + " " + ampm);
      $(this).removeClass('local-time');
    }
  });
}<commit_msg>fixes issue with return vs continue<commit_after>$(document).ready(function(){
  localizeTime();
});

$(document).on('page:load', localizeTime);

function localizeTime(){
  var now = new Date();
  var utcOffset = now.getTimezoneOffset() * 1000 * 60;
  $('.local-time').each(function() {
    // localize servertime of the record and make it a Date Object
    var serverTime = $(this).text();
    var newTimeObject = new Date(serverTime);
    if (isNaN(newTimeObject.getFullYear())) {
      continue;
    }
    var localizedTime = new Date(newTimeObject - utcOffset);

    //Get displayable data from the Date Object
    var year = localizedTime.getFullYear();
    var month = localizedTime.getMonth() + 1;
    var day = localizedTime.getDate();
    var hours = localizedTime.getHours();

    //Tweaks: 24hour clock to 12, add a leading 0 to minutes less than 10, etc.
    var ampm = hours >= 12 ? 'PM' : 'AM'
    hours = hours % 12;
    hours = hours ? hours : 12;
    var minutes = (localizedTime.getMinutes() < 10 ? '0' : '') + localizedTime.getMinutes();

    if ($(this).text() != "") {
      $(this).text(month + "/" + day + "/" + year + " " + hours + ":" + minutes + " " + ampm);
      $(this).removeClass('local-time');
    }
  });
}
{'fraction_non_alphanumeric': 0.16598860862489828, 'fraction_numerical': 0.01871440195280716, 'mean_word_length': 3.1258389261744965, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, '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': '808147', 'n_tokens_mistral': 831, 'n_tokens_neox': 769, 'n_words': 215}