code: func (pc *Periodic) cmpDayOfWeek(ref time.Time) time.Duration {
  	pStart := pc.shiftTimeByDays(ref, -int(ref.Weekday())+pc.start.dayOfWeek)
  	return ref.Sub(pStart)
  }
docs: // cmpDayOfWeek compares ref to Periodic occurring in the same week as ref.
  // The return value is less than, equal to, or greater than zero if ref occurs
  // before, equal to, or after the start of Periodic within the same week.