lib/date-utils.js
function(num) {
    num = parseInt(num);

    if (num < 10) {
      num = '0' + num;
    } else {
      num = num.toString();
    }

    return num;
  }
function(num) {
    num = parseInt(num);

    if (num < 10) {
      num = '0' + num;
    } else {
      num = num.toString();
    }

    return num;
  }
function ( num ) { num = parseInt ( num ) ; if ( num < 10 ) { num = '0' + num ; } else { num = num . toString ( ) ; } return num ; }
Adds a leading zero to a single-digit number.
@param {number} num
@return {string}
Adds a leading zero to a single - digit number .