<commit_before>function updateHiddenDate(elt)
{
    elt = $(elt);
    if (elt.value.length >= 10) {
        day = elt.value.substring(0,2);
        month = elt.value.substring(3,5);
        year = elt.value.substring(6,10);
        elt.up().down("input.date-selector-hidden").value = year + "-" + month + "-" + day;
    }

    if (elt.value.length == 0) {
        elt.up().down("input.date-selector-hidden").value = "";
    }
}

function updateHiddenDateTime(elt)
{
    elt = $(elt);
    if (elt.value.length >= 16) {
        day = elt.value.substring(0,2);
        month = elt.value.substring(3,5);
        year = elt.value.substring(6,10);
        hour = elt.value.substring(11,13);
        minute = elt.value.substring(14,16);
        elt.up().down("input.datetime-selector-hidden").value = year + "-" + month + "-" + day + " " + hour + ":" + minute;
    }

    if (elt.value.length == 0) {
        elt.up().down("input.datetime-selector-hidden").value = "";
    }
}

function onDateCalendarUpdate(calendar, date) {
    $(calendar.params.displayArea).value = calendar.date.print("%d/%m/%Y");
    $(calendar.params.inputField).value = calendar.date.print("%Y-%m-%d %H:%M:%S");
    if ($(calendar).dateClicked)
    {
        $(calendar).destroy();
    }
}

function onDatetimeCalendarUpdate(calendar, date) {
    $(calendar.params.displayArea).value = calendar.date.print("%d/%m/%Y %H:%M");
    $(calendar.params.inputField).value = calendar.date.print("%Y-%m-%d %H:%M:%S");
}

function onDateFieldBlur(elt)
{
    completeDateStringFor(elt);

    if (!isValidDateString($(elt).value) && $(elt).value != "")
    {
        alert("La date entrée n'est pas valide.\n Exemple : 09/01/2009")
        $(elt).value = "";
        elt.up().down("input.date-selector-hidden").value = "";
    }
}

function onDateTimeFieldBlur(elt)
{
    if (!isValidDateTimeString($(elt).value) && $(elt).value != "")
    {<commit_msg>Mini fix<commit_after>function updateHiddenDate(elt)
{
    elt = $(elt);
    if (elt.value.length >= 10) {
        day = elt.value.substring(0,2);
        month = elt.value.substring(3,5);
        year = elt.value.substring(6,10);
        elt.up().down("input.date-selector-hidden").value = year + "-" + month + "-" + day;
    }

    if (elt.value.length == 0) {
        elt.up().down("input.date-selector-hidden").value = "";
    }
}

function updateHiddenDateTime(elt)
{
    elt = $(elt);
    if (elt.value.length >= 16) {
        day = elt.value.substring(0,2);
        month = elt.value.substring(3,5);
        year = elt.value.substring(6,10);
        hour = elt.value.substring(11,13);
        minute = elt.value.substring(14,16);
        elt.up().down("input.datetime-selector-hidden").value = year + "-" + month + "-" + day + " " + hour + ":" + minute;
    }

    if (elt.value.length == 0) {
        elt.up().down("input.datetime-selector-hidden").value = "";
    }
}

function onDateCalendarUpdate(calendar, date) {
    $(calendar.params.displayArea).value = calendar.date.print("%d/%m/%Y");
    $(calendar.params.inputField).value = calendar.date.print("%Y-%m-%d %H:%M:%S");
    if ($(calendar).dateClicked)
    {
        $(calendar).destroy();
    }
}

function onDatetimeCalendarUpdate(calendar, date) {
    $(calendar.params.displayArea).value = calendar.date.print("%d/%m/%Y %H:%M");
    $(calendar.params.inputField).value = calendar.date.print("%Y-%m-%d %H:%M:%S");
}

function onDateFieldBlur(elt)
{
    completeDateStringFor(elt);

    if (!isValidDateString($(elt).value) && $(elt).value != "")
    {
        alert("La date entrée n'est pas valide.\n Exemple : 09/01/2009")
        $(elt).value = "";
        elt.up().down("input.date-selector-hidden").value = "";
    }

    updateHiddenDate(elt);
}

function onDateTimeFieldBlur(elt)
{
    if (!isValidDateTimeString($(elt).value) && $(elt).value != "")
    {
{'fraction_non_alphanumeric': 0.20760614743422767, 'fraction_numerical': 0.01875488408439698, 'mean_word_length': 2.878787878787879, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 7, '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': '4147754', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1300, 'n_words': 180}