[IMP] simplify code of padding function in date formatting.

bzr revid: sma@tinyerp.com-20110812114402-u9u8vxxp1fnonq3m
This commit is contained in:
sma (Tiny) 2011-08-12 17:14:02 +05:30
parent 2c2fe7a691
commit ee581f8247
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ openerp.base.parse_time = function(str) {
*/
var zpad = function(str, size) {
str = "" + str;
return new Array(size - str.length).join('0') + str;
return new Array(_.range(size - str.length)).join('0') + str;
};
/**