本文整理汇总了Golang中murus/day.Imp类的典型用法代码示例。如果您正苦于以下问题:Golang Imp类的具体用法?Golang Imp怎么用?Golang Imp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Imp类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: clearAll
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)
}
}
示例2: writeAll
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)
}
}
示例3: pos
func pos(D *day.Imp) (uint, uint) {
//
switch period {
case day.Yearly:
return D.PosInYear()
case day.Monthly:
return D.PosInMonth(true, 1, 3, dc)
case day.Weekly:
return D.PosInWeek(false, dc)
}
return 0, 0
}
示例4:
func (x *Imp) monday (d *day.Imp, n uint) {
//
w:= x.numWeeks ()
if n == 0 || n > w {
d.Clr()
return
}
x.lectures (d, tmp)
for i:= uint(0); i + 1 < n; i++ {
d.Inc (day.Weekly)
}
if ! x.summer () && n > 10 { // Akademische Ferien
d.Inc (day.Weekly)
d.Inc (day.Weekly)
}
}
示例5: Set
func (x *Imp) Set(d *day.Imp, t *clk.Imp) {
//
x.day = d.Clone().(*day.Imp)
x.time = t.Clone().(*clk.Imp)
}
示例6: Set
func (x *Imp) Set(d *day.Imp) {
//
x.Imp = d.Clone().(*day.Imp)
x.list.Clr()
}