<commit_before>module.exports = {    

    /**
     * Return abbreviated week day name
     * @param {Date}
     * @return {String}
     */
    getDayNameAbbr(date) {
        let dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
        if (typeof date !== 'object') {
            throw TypeError('Invalid Type');
        }
        return dayNames[date.getDay()];
    },

    /**
     * Return name of the month
     * @param {Number|Date}
     * @return {String}
     */
    getMonthName(month) {
        let monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
        if (typeof month === 'object') {
            return monthNames[month.getMonth()];
        }
        if (typeof month === 'number') {
            return monthNames[month];
        }
        throw TypeError('Invalid type');
    },

    /**
     * Return an abbreviated version of the month
     * @param {Number|Date}
     * @return {String}
     */
    getMonthNameAbbr(month) {
        let monthAbbr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
        if (typeof month === 'object') {
            return monthAbbr[month.getMonth()];
        }
        if (typeof month === 'number') {
            return monthAbbr[month];
        }
        throw TypeError('Invalid type');
    },

    /**
     * Return the number of days in the month
     * @param {Number} year
     * @param {Number} month
     * @return {Number}
     */
    daysInMonth(year, month) {
        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
    },

    /**
     * Returns number of days between two dates
     * @param {Date} start
     * @param {Date} end
     * @return {Number}
     */
    dayDiff(start, end) {
        return Math.floor((end - start) / (1000*60*60*24));
    }
}
<commit_msg>don't use timezones for dayDiff method<commit_after>module.exports = {    

    /**
     * Return abbreviated week day name
     * @param {Date}
     * @return {String}
     */
    getDayNameAbbr(date) {
        let dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
        if (typeof date !== 'object') {
            throw TypeError('Invalid Type');
        }
        return dayNames[date.getDay()];
    },

    /**
     * Return name of the month
     * @param {Number|Date}
     * @return {String}
     */
    getMonthName(month) {
        let monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
        if (typeof month === 'object') {
            return monthNames[month.getMonth()];
        }
        if (typeof month === 'number') {
            return monthNames[month];
        }
        throw TypeError('Invalid type');
    },

    /**
     * Return an abbreviated version of the month
     * @param {Number|Date}
     * @return {String}
     */
    getMonthNameAbbr(month) {
        let monthAbbr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
        if (typeof month === 'object') {
            return monthAbbr[month.getMonth()];
        }
        if (typeof month === 'number') {
            return monthAbbr[month];
        }
        throw TypeError('Invalid type');
    },

    /**
     * Return the number of days in the month
     * @param {Number} year
     * @param {Number} month
     * @return {Number}
     */
    daysInMonth(year, month) {
        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
    },

    /**
     * Returns number of days between two dates
     * @param {Date} start
     * @param {Date} end
     * @return {Number}
     */
    dayDiff(start, end) {
        const MS_PER_DAY = 1000 * 60 * 60 * 24;

        // Discard the time and time-zone information.
        let startUTC = Date.UTC(start.getFullYear(), start.getMonth(), start.getDate());
        let endUTC = Date.UTC(end.getFullYear(), end.getMonth(), end.getDate());

        return Math.floor((endUTC - startUTC) / MS_PER_DAY);
    }
}

{'fraction_non_alphanumeric': 0.16809815950920245, 'fraction_numerical': 0.00588957055214724, 'mean_word_length': 2.099619771863118, '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': '1422948', 'n_tokens_mistral': 1320, 'n_tokens_neox': 1234, 'n_words': 335}