Skip to content

Instantly share code, notes, and snippets.

/* Based on
* - EGM Mathematical Finance class by Enrique Garcia M. <egarcia@egm.co>
* - A Guide to the PMT, FV, IPMT and PPMT Functions by Kevin (aka MWVisa1)
*/
var ExcelFormulas = {
PVIF: function(rate, nper) {
return Math.pow(1 + rate, nper);
},
// there is a solution for jQuery < 1.9.0, where you can use `$.browser`:
// https://gist.github.com/nathansmith/950767
// but jQuery removed `$.browser` in version 1.9.0, so you have to get another way:
function last_child() {
if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {
$('*:last-child').addClass('last-child');
}
}