dist/jquery.schedule.js
function (position) {
      if (position >= this.periodHeight) {
        position = 0;
      }

      if (position < 0) {
        position = 0;
      }

      var hour = Math.floor(position / this.periodInterval);
      var mn = (position / this.periodInterval - hour) * 60;

      if (this.settings.hour === 12) {
        var time = hour;
        var ind = '';

        if (hour >= 12) {
          ind = 'p';
        }
        if (hour > 12) {
          time = hour - 12;
        }
        if (hour === 0 || hour === 24) {
          ind = '';
          time = 12;
        }
        if (mn !== 0) {
          time += ':' + mn;
        }

        return time + ind;
      }

      if (hour < 10) {
        hour = '0' + hour;
      }
      if (mn < 10) {
        mn = '0' + mn;
      }

      return hour + ':' + mn;
    }
function (position) {
      if (position >= this.periodHeight) {
        position = 0;
      }

      if (position < 0) {
        position = 0;
      }

      var hour = Math.floor(position / this.periodInterval);
      var mn = (position / this.periodInterval - hour) * 60;

      if (this.settings.hour === 12) {
        var time = hour;
        var ind = '';

        if (hour >= 12) {
          ind = 'p';
        }
        if (hour > 12) {
          time = hour - 12;
        }
        if (hour === 0 || hour === 24) {
          ind = '';
          time = 12;
        }
        if (mn !== 0) {
          time += ':' + mn;
        }

        return time + ind;
      }

      if (hour < 10) {
        hour = '0' + hour;
      }
      if (mn < 10) {
        mn = '0' + mn;
      }

      return hour + ':' + mn;
    }
function ( position ) { if ( position >= this . periodHeight ) { position = 0 ; } if ( position < 0 ) { position = 0 ; } var hour = Math . floor ( position / this . periodInterval ) ; var mn = ( position / this . periodInterval - hour ) * 60 ; if ( this . settings . hour === 12 ) { var time = hour ; var ind = '' ; if ( hour >= 12 ) { ind = 'p' ; } if ( hour > 12 ) { time = hour - 12 ; } if ( hour === 0 || hour === 24 ) { ind = '' ; time = 12 ; } if ( mn !== 0 ) { time += ':' + mn ; } return time + ind ; } if ( hour < 10 ) { hour = '0' + hour ; } if ( mn < 10 ) { mn = '0' + mn ; } return hour + ':' + mn ; }
Return a readable hour from a position
@param position
@returns {number}
Return a readable hour from a position