toFixed

adds a leading zero to a number, if it's less than 10

number|string toFixed(number|string num);

Parameters

numnumber|stringa number that the method is applied to

Returns

number|stringthe formatted number

Example

webix.Date.toFixed(7); // -> "07"
 
webix.Date.toFixed(17); // -> 17
 
webix.Date.toFixed("7"); // -> "07"

Back to top