<%
replaceYesNo = function(val) {
    var answer = (typeof val !== "undefined" && val) ? (val === 1 ? "Da" : "Nu" ) : null ;
    return answer;
}

rcFormatPrice = function(init_price){
    let initPrStr = init_price.toString();
    if(initPrStr.length > 3){
        let formattedPrice = '';
        if(initPrStr.length > 6){
            formattedPrice += initPrStr.slice(-9, -6) + ",";
        }
        formattedPrice += initPrStr.slice(-6, - 3) + "," + initPrStr.slice(-3);
        return formattedPrice;
    }
    else return init_price;
}


replaceNumberMonth = function(val) {
    if(val === 1){
        var month = "Ianuarie";
    } else if(val === 2){
        var month = "Februarie";
    } else if(val === 3){
        var month = "Martie";
    } else if(val === 4){
        var month = "Aprilie";
    } else if(val === 5){
        var month = "Mai";
    } else if(val === 6){
        var month = "Iunie";
    } else if(val === 7){
        var month = "Iulie";
    } else if(val === 8){
        var month = "August";
    } else if(val === 9){
        var month = "Septembrie";
    } else if(val === 10){
        var month = "Octombrie";
    } else if(val === 11){
        var month = "Noiembrie";
    } else if(val === 12){
        var month = "Decembrie";
    }

    return month;
}
%>