This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number.prototype.toPhrase = function (fem, one, two, three, four, five) | |
// Число прописью от 0 до 999 триллионов | |
// 100.toPhrase(false, 'чайник', 'чайника', 'чайника', 'чайника', 'чайников') | |
{ | |
var x = Math.round((this + Number.EPSILON) * 100) / 100; | |
if (x < 0 || x > 999999999999999.99) return false; | |
if (fem === undefined) fem = true; | |
if (!one) one = 'единица'; | |
if (!two) two = 'единицы'; |