<commit_before>$(document).ready(function () {
    $('.tmcov-opt').click(function() {
        $('.tmcov-opt').removeClass('active-tmcov');
        console.log('time option clicked!');

        var $this = $(this);
        if (!$this.hasClass('active-tmcov')) {
            $this.addClass('active-tmcov');
        }
        console.log($(this).attr('id'));
        if ($(this).attr('id') == 'Tm-Cvrg-All') {
            endDateObj = moment();
            begDateObj = moment("2008-03-28");
            tmCvrg = 'Tm-Cvrg-All';
        }
        if ($(this).attr('id') == 'Tm-Cvrg-Yr') {
            endDateObj = moment();
            begDateObj = moment();
            begDateObj = begDateObj.days(-365);
            tmCvrg = 'Tm-Cvrg-Yr';
        }
        if ($(this).attr('id') == 'Tm-Cvrg-Mnth') {
            endDateObj = moment();
            begDateObj = moment();
            begDateObj = begDateObj.days(-30);
            tmCvrg = 'Tm-Cvrg-Mnth';
        }
        if ($(this).attr('id') == 'Tm-Cvrg-Wk') {
            endDateObj = moment();
            begDateObj = moment();
            begDateObj = begDateObj.days(-7);
            tmCvrg = 'Tm-Cvrg-Wk';
        }

        plotHeatmap();

    });

});

//Default is to plot all data. The first issue was from 2008-03-29:
var tmCvrg = 'Tm-Cvrg-All';
var endDateObj = moment();
var begDateObj = moment("2008-03-28");

var begDate = begDateObj.format('YYYY-MM-DDTHH:mm:ss');
var endDate = endDateObj.format('YYYY-MM-DDTHH:mm:ss');
<commit_msg>correctly sets dates<commit_after>$(document).ready(function () {
    $('.tmcov-opt').click(function() {
        $('.tmcov-opt').removeClass('active-tmcov');
        console.log('time option clicked!');

        var $this = $(this);
        if (!$this.hasClass('active-tmcov')) {
            $this.addClass('active-tmcov');
        }
        console.log($(this).attr('id'));
        if ($(this).attr('id') == 'Tm-Cvrg-All') {
            endDateObj = moment();
            begDateObj = moment("2008-03-28");
            begDate = begDateObj.format('YYYY-MM-DDTHH:mm:ss');
            endDate = endDateObj.format('YYYY-MM-DDTHH:mm:ss');
            console.log('report.js registered a Time Coverage ALL click!');
            tmCvrg = 'Tm-Cvrg-All';
        }
        if ($(this).attr('id') == 'Tm-Cvrg-Yr') {
            endDateObj = moment();
            begDateObj = moment();
            begDateObj = begDateObj.days(-365);
            begDate = begDateObj.format('YYYY-MM-DDTHH:mm:ss');
            endDate = endDateObj.format('YYYY-MM-DDTHH:mm:ss');
            console.log('report.js registered a Past Year click!');
            console.log('begDate is: ' + begDate);
            console.log('endDate is: ' + endDate);

            tmCvrg = 'Tm-Cvrg-Yr';
        }
        if ($(this).attr('id') == 'Tm-Cvrg-Mnth') {
            endDateObj = moment();
            begDateObj = moment();
            begDateObj = begDateObj.days(-30);
            begDate = begDateObj.format('YYYY-MM-DDTHH:mm:ss');
            endDate = endDateObj.format('YYYY-MM-DDTHH:mm:ss');
            console.log('report.js registered a Past Month click!');
            tmCvrg = 'Tm-Cvrg-Mnth';
        }
        if ($(this).attr('id') == 'Tm-Cvrg-Wk') {
            endDateObj = moment();
            begDateObj = moment();
            begDateObj = begDateObj.days(-7);
            begDate = begDateObj.format('YYYY-MM-DDTHH:mm:ss');
            endDate = endDateObj.format('YYYY-MM-DDTHH:mm:ss');
            console.log('report.js registered a Past Week click!');
            tmCvrg = 'Tm-Cvrg-Wk';
        }

        plotHeatmap();

    });

});

//Default is to plot all data. The first issue was from 2008-03-29:
var tmCvrg = 'Tm-Cvrg-All';
var endDateObj = moment();
var begDateObj = moment("2008-03-28");

var begDate = begDateObj.format('YYYY-MM-DDTHH:mm:ss');
var endDate = endDateObj.format('YYYY-MM-DDTHH:mm:ss');

{'fraction_non_alphanumeric': 0.18181818181818182, 'fraction_numerical': 0.015364916773367477, 'mean_word_length': 2.053948397185301, 'pattern_counts': {'":': 0, '<': 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': '6670634', 'n_tokens_mistral': 1386, 'n_tokens_neox': 1341, 'n_words': 215}