docs: function TimePickerCtrl($scope, $mdDialog, time, autoSwitch, $mdMedia) {
  	var self = this;
      this.VIEW_HOURS = 1;
      this.VIEW_MINUTES = 2;
      this.currentView = this.VIEW_HOURS;
      this.time = moment(time);
      this.autoSwitch = !!autoSwitch;
      
      this.clockHours = parseInt(this.time.format("h"));
      this.clockMinutes = parseInt(this.time.minutes());
      
  	$scope.$mdMedia = $mdMedia;
  	
  	this.switchView = function() {
  	    self.currentView = self.currentView == self.VIEW_HOURS ? self.VIEW_MINUTES : self.VIEW_HOURS;
  	};
      
  	this.setAM = function() {
          if(self.time.hours() >= 12)
              self.time.hour(self.time.hour() - 12);
  	};
      
      this.setPM = function() {
          if(self.time.hours() < 12)
              self.time.hour(self.time.hour() + 12);
  	};
      
      this.cancel = function() {
          $mdDialog.cancel();
      };
  
      this.confirm = function() {
          $mdDialog.hide(this.time.toDate());
      };
  }