code: func roundDuration(in int64) int64 {
  	abs := in
  	if abs < 0 {
  		abs = -abs
  	}
  	if abs <= 10 { // 10s -> don't round
  		return in
  	} else if abs <= 60 { // 1min -> round to 10s
  		return round(in, 10)
  	} else if abs <= 600 { // 10min -> round to 1min
  		return round(in, 60)
  	} else if abs <= 3600 { // 1h -> round to 10min
  		return round(in, 600)
  	} else if abs <= 3600*24 { // 24h -> round to 1h
  		return round(in, 3600)
  	} else if abs <= 3600*24*7 { // 7d -> round to 1d
  		return round(in, 3600*24)
  	} else if abs <= 3600*24*30 { // 30d -> round to 7d
  		return round(in, 3600*24*7)
  	}
  	// default to rounding to months
  	return round(in, 3600*24*30)
  }
docs: // roundDuration rounds a second-specified duration for rough classification