code: func minMaxViews(views []string, q TimeQuantum) (min string, max string) {
  	// Sort the list of views.
  	sort.Strings(views)
  
  	// Determine the least significant quantum and set that as the
  	// number of string characters to compare against.
  	var chars int
  	if q.HasYear() {
  		chars = 4
  	} else if q.HasMonth() {
  		chars = 6
  	} else if q.HasDay() {
  		chars = 8
  	} else if q.HasHour() {
  		chars = 10
  	}
  
  	// min: get the first view with the matching number of time chars.
  	for _, v := range views {
  		if len(viewTimePart(v)) == chars {
  			min = v
  			break
  		}
  	}
  
  	// max: get the first view (from the end) with the matching number of time chars.
  	for i := len(views) - 1; i >= 0; i-- {
  		if len(viewTimePart(views[i])) == chars {
  			max = views[i]
  			break
  		}
  	}
  
  	return min, max
  }
docs: // minMaxViews returns the min and max view from a list of views
  // with a time quantum taken into consideration. It assumes that
  // all views represent the same base view name (the logic depends
  // on the views sorting correctly in alphabetical order).