<commit_before>function generateBirthDate() {
    var days    = document.getElementById('dobdd'),
        months  = document.getElementById('dobmm'),
        year    = document.getElementById('dobyy'),
        japanese_client = require('../country_base').japanese_client;

    if (document.getElementById('dobdd').length > 1) return;

    //days
    dropDownNumbers(days, 1, 31);
    //months
    dropDownMonths(months, 1, 12);
    var currentYear = new Date().getFullYear();
    var startYear = currentYear - 100;
    var endYear = currentYear - 17;
    //years
    dropDownNumbers(year, startYear, endYear);
    if (japanese_client()) {
      days.options[0].innerHTML = page.text.localize('Day');
      months.options[0].innerHTML = page.text.localize('Month');
      year.options[0].innerHTML = page.text.localize('Year');
    }
    return;
}

// append numbers to a drop down menu, eg 1-30
function dropDownNumbers(select, startNum, endNum) {
    select.appendChild(document.createElement("option"));

    for (var i = startNum; i <= endNum; i++){
        var option = document.createElement("option");
        option.text = i;
        option.value = i;
        select.appendChild(option);
    }
    return;

}

function dropDownMonths(select, startNum, endNum) {
    var months = [
        page.text.localize("Jan"),
        page.text.localize("Feb"),
        page.text.localize("Mar"),
        page.text.localize("Apr"),
        page.text.localize("May"),
        page.text.localize("Jun"),
        page.text.localize("Jul"),
        page.text.localize("Aug"),
        page.text.localize("Sep"),
        page.text.localize("Oct"),
        page.text.localize("Nov"),
        page.text.localize("Dec")
    ];
    select.appendChild(document.createElement("option"));
    for (var i = startNum; i <= endNum; i++){
        var option = document.createElement("option");
        if (i <= '9') {
            option.value = '0' + i;
        } else {
            option.value = i;
        }
        for (var j = i; j <= i; j++) {
            option.text = months[j-1];
        }
        select.appendChild(option);
    }
    return;
}

module.exports = {
    generateBirthDate: generateBirthDate,
};
<commit_msg>Fix account opening issue<commit_after>function generateBirthDate() {
    var days    = document.getElementById('dobdd'),
        months  = document.getElementById('dobmm'),
        year    = document.getElementById('dobyy'),
        japanese_client = require('../country_base').japanese_client;

    if (!days || document.getElementById('dobdd').length > 1) return;

    //days
    dropDownNumbers(days, 1, 31);
    //months
    dropDownMonths(months, 1, 12);
    //years
    var currentYear = new Date().getFullYear(),
        startYear = currentYear - 100,
        endYear   = currentYear - 17;
    dropDownNumbers(year, startYear, endYear);

    if (japanese_client()) {
      days.options[0].innerHTML   = page.text.localize('Day');
      months.options[0].innerHTML = page.text.localize('Month');
      year.options[0].innerHTML   = page.text.localize('Year');
    }
    return;
}

// append numbers to a drop down menu, eg 1-30
function dropDownNumbers(select, startNum, endNum) {
    select.appendChild(document.createElement("option"));

    for (var i = startNum; i <= endNum; i++){
        var option = document.createElement("option");
        option.text = i;
        option.value = i;
        select.appendChild(option);
    }
    return;

}

function dropDownMonths(select, startNum, endNum) {
    var months = [
        page.text.localize("Jan"),
        page.text.localize("Feb"),
        page.text.localize("Mar"),
        page.text.localize("Apr"),
        page.text.localize("May"),
        page.text.localize("Jun"),
        page.text.localize("Jul"),
        page.text.localize("Aug"),
        page.text.localize("Sep"),
        page.text.localize("Oct"),
        page.text.localize("Nov"),
        page.text.localize("Dec")
    ];
    select.appendChild(document.createElement("option"));
    for (var i = startNum; i <= endNum; i++){
        var option = document.createElement("option");
        if (i <= '9') {
            option.value = '0' + i;
        } else {
            option.value = i;
        }
        for (var j = i; j <= i; j++) {
            option.text = months[j-1];
        }
        select.appendChild(option);
    }
    return;
}

module.exports = {
    generateBirthDate: generateBirthDate,
};

{'fraction_non_alphanumeric': 0.15393258426966291, 'fraction_numerical': 0.00943820224719101, 'mean_word_length': 2.485512920908379, 'pattern_counts': {'":': 0, '<': 11, '<?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': '7393508', 'n_tokens_mistral': 1396, 'n_tokens_neox': 1340, 'n_words': 262}