code: func (pc *Periodic) Previous(ref time.Time) (p *Period) {
  	p = &Period{}
  	if pc.start.dayOfWeek != -1 { // Weekly
  		if pc.cmpDayOfWeek(ref) >= 0 {
  			// this week
  			p.Start = pc.shiftTimeByDays(ref, -(int(ref.Weekday()) - pc.start.dayOfWeek))
  		} else {
  			// last week
  			p.Start = pc.shiftTimeByDays(ref, -(int(ref.Weekday()) + (7 - pc.start.dayOfWeek)))
  		}
  	} else if pc.start.hourOfDay != -1 { // Daily
  		if pc.cmpHourOfDay(ref) >= 0 {
  			// today
  			p.Start = pc.shiftTimeByDays(ref, 0)
  		} else {
  			// yesterday
  			p.Start = pc.shiftTimeByDays(ref, -1)
  		}
  	} // XXX(mischief): other intervals unsupported atm.
  
  	p.End = p.Start.Add(pc.duration)
  	return
  }
docs: // Previous returns Periodic's previous Period occurrence relative to ref.