<commit_before>(function () {
    var children = $('#children-page');
    var childrenList = children.find('#children-list');
    var childPage = null;

    function getAge(bday) {
        //TODO: return age like- "10 days" or "2 years 3 months"
        return "4 months";
    }

    function buildChildPage(page, child) {
        // add page
        var id = "child-" + child.id;<commit_msg>Age of the child calculated<commit_after>(function () {
    var children = $('#children-page');
    var childrenList = children.find('#children-list');
    var childPage = null;

    function getAge(bday) {
        //TODO: return age like- "10 days" or "2 years 3 months"
        var ret = "";
        Date date = new Date();
        var diffDay =  Math.floor(( date.getTime() - bday.getTime()) ) / 86400000);
        var years = Math.floor(diffDay/365);
        var months = Math.floor((diffDay % 365) / 31);
        var days = (diffDay % 365) % 31 ;
        if( years > 0) ret += years + " year" + (years > 1 ? "s " : "");
        if(months > 0) ret += months + " month" + (months > 1 ? "s" : "");
        if(days > 0) ret += days + " day" + (days > 1 ? "s" : "");
        if(ret === "") ret = "0 day";
        return ret;
    }

    function buildChildPage(page, child) {
        // add page
        var id = "child-" + child.id;
{'fraction_non_alphanumeric': 0.16691842900302115, 'fraction_numerical': 0.027945619335347432, 'mean_word_length': 2.1547619047619047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '487049', 'n_tokens_mistral': 450, 'n_tokens_neox': 411, 'n_words': 126}