code: func timeOfView(v string, adj bool) (time.Time, error) {
  	if v == "" {
  		return time.Time{}, nil
  	}
  
  	layout := "2006010203"
  	timePart := viewTimePart(v)
  
  	switch len(timePart) {
  	case 4: // year
  		t, err := time.Parse(layout[:4], timePart)
  		if err != nil {
  			return time.Time{}, err
  		}
  		if adj {
  			t = t.AddDate(1, 0, 0)
  		}
  		return t, nil
  	case 6: // month
  		t, err := time.Parse(layout[:6], timePart)
  		if err != nil {
  			return time.Time{}, err
  		}
  		if adj {
  			t = addMonth(t)
  		}
  		return t, nil
  	case 8: // day
  		t, err := time.Parse(layout[:8], timePart)
  		if err != nil {
  			return time.Time{}, err
  		}
  		if adj {
  			t = t.AddDate(0, 0, 1)
  		}
  		return t, nil
  	case 10: // hour
  		t, err := time.Parse(layout[:10], timePart)
  		if err != nil {
  			return time.Time{}, err
  		}
  		if adj {
  			t = t.Add(time.Hour)
  		}
  		return t, nil
  	}
  
  	return time.Time{}, fmt.Errorf("invalid time format on view: %s", v)
  }
docs: // timeOfView returns a valid time.Time based on the view string.
  // For upper bound use, the result can be adjusted by one by setting
  // the `adj` argument to `true`.