<commit_before>/**
 * Calendar full view.
 *
 * https://github.com/slventures/calendar
 *
 */
"use strict";

import pluginCreator from "jquery-plugincreator";
import isFunction from "lodash/lang/isFunction";
import template from "lodash/string/template";
import each from "lodash/collection/each";

//TODO: Remove these monkeypatches
function getWeek(date) {
    var onejan = new Date(date.getFullYear(), 0, 1);
    return Math.ceil((((date.getTime() - onejan.getTime()) / 86400000) + onejan.getDay() + 1) / 7);
}

function getMonthFormatted(date) {
    var month = date.getMonth() + 1;
    return month < 10 ? '0' + month : month;
}

function getDateFormatted(date) {
    var date = date.getDate();
    return date < 10 ? '0' + date : date;
}

function format(string) {
    var args = $.makeArray(arguments).slice(1);
    return string.replace(/{(\d+)}/g, function (match, number) {
        return typeof args[number] != 'undefined' ? args[number] : match;
    });
}
<commit_msg>use strict is on by default in ES6<commit_after>/**
 * Calendar full view.
 *
 * https://github.com/slventures/calendar
 *
 */

import pluginCreator from "jquery-plugincreator";
import isFunction from "lodash/lang/isFunction";
import template from "lodash/string/template";
import each from "lodash/collection/each";

//TODO: Remove these monkeypatches
function getWeek(date) {
    var onejan = new Date(date.getFullYear(), 0, 1);
    return Math.ceil((((date.getTime() - onejan.getTime()) / 86400000) + onejan.getDay() + 1) / 7);
}

function getMonthFormatted(date) {
    var month = date.getMonth() + 1;
    return month < 10 ? '0' + month : month;
}

function getDateFormatted(date) {
    var date = date.getDate();
    return date < 10 ? '0' + date : date;
}

function format(string) {
    var args = $.makeArray(arguments).slice(1);
    return string.replace(/{(\d+)}/g, function (match, number) {
        return typeof args[number] != 'undefined' ? args[number] : match;
    });
}

{'fraction_non_alphanumeric': 0.15709201830198272, 'fraction_numerical': 0.020843924758515507, 'mean_word_length': 3.753623188405797, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5851719', 'n_tokens_mistral': 686, 'n_tokens_neox': 641, 'n_words': 167}