build/ical.js
function pad(data) {
    if (typeof(data) !== 'string') {
      // handle fractions.
      if (typeof(data) === 'number') {
        data = parseInt(data);
      }
      data = String(data);
    }

    var len = data.length;

    switch (len) {
      case 0:
        return '00';
      case 1:
        return '0' + data;
      default:
        return data;
    }
  }
function pad(data) {
    if (typeof(data) !== 'string') {
      // handle fractions.
      if (typeof(data) === 'number') {
        data = parseInt(data);
      }
      data = String(data);
    }

    var len = data.length;

    switch (len) {
      case 0:
        return '00';
      case 1:
        return '0' + data;
      default:
        return data;
    }
  }
function pad ( data ) { if ( typeof ( data ) !== 'string' ) { // handle fractions. if ( typeof ( data ) === 'number' ) { data = parseInt ( data ) ; } data = String ( data ) ; } var len = data . length ; switch ( len ) { case 0 : return '00' ; case 1 : return '0' + data ; default : return data ; } }
Pads the given string or number with zeros so it will have at least two
characters.

@param {String|Number} data    The string or number to pad
@return {String}               The number padded as a string
Pads the given string or number with zeros so it will have at least two characters .