File "formatters.js"

Full Path: /home/adniftyx/public_html/wp-content/plugins/smart-loan-calculator/APP/LIB-JS/formatters.js
File size: 1.35 KB
MIME-type: text/plain
Charset: utf-8

function EUR(r){for(var r=INT(r),e=0;e<10;e++)r=r.replace(",","c");for(e=0;e<10;e++)r=r.replace(".","d");for(e=0;e<10;e++)r=r.replace("c",".");for(e=0;e<10;e++)r=r.replace("d",",");return r+"€"}function CHECK_DIV0(r){return"#DIV/0!"==r?"-":r}function INT(r){return""==r||"-"==r?"$0":((r=parseFloat(r))<0?"-":"")+"$"+(r=(r=Math.abs(r.toFixed(0))).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","))}function INTX(r){return""==r||"-"==r?"$0":((r=parseFloat(r))<0?"-":"")+(r=(r=Math.abs(r.toFixed(2))).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","))}function INTX_RATIOS(r,e){return"-"==e||$("#"+e).attr("raw-val",r),""==r||"-"==r?"$0":((r=parseFloat(r))<0?"-":"")+(r=(r=Math.abs(r.toFixed(2))).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","))}function INTS_BALANCESHEET(r){return""==r||"-"==r||isNaN(r)?"-":(r<0?"-":"")+(r=(r=(r=Math.abs(r)).toFixed(1)).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","))}function INTS(r){return""==r||"-"==r||isNaN(r)?"-":(r<0?"-":"")+(r=(r=(r=Math.abs(r)).toFixed(2)).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","))}function FORMAT_SYM(r){return""==r||"-"==r||"$0"==r||"0"==r?0:(r=r.replace(/[^\d.-]/g,""),parseFloat(r))}function EURTONUM(r){for(var e=0;e<10;e++)r=r.replace(",","c");for(e=0;e<10;e++)r=r.replace(".","d");console.log("x="+r);for(e=0;e<10;e++)r=r.replace("c",".");for(e=0;e<10;e++)r=r.replace("d",",");return r=r.replace(/[^\d.-]/g,"")}