func writeAll(D *day.Imp) { // switch period { case day.Monthly, day.Weekly: if D.Empty() { return } default: return } D1 := day.New() D1.Copy(D) D1.SetBeginning(period) cal.SetFormat(period) for D.Equiv(D1, period) { l, c := pos(D1) cal.Seek(D1) cal.SetFormat(period) // weil Seek über Define <- Clone das Format mitkopiert cal.WriteDay(l0+l, c0+c) D1.Inc(day.Daily) } }
func clearAll(D *day.Imp) { // switch period { case day.Monthly, day.Weekly: if D.Empty() { return } default: return } D1 := day.New() D1.Copy(D) D1.SetBeginning(period) cal.SetFormat(period) for D.Equiv(D1, period) { l, c := pos(D1) errh.Error("Tag Nr.", D1.OrdDay()) cal.ClearDay(D1, l0+l, c0+c) D1.Inc(day.Daily) } }