本文整理匯總了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()
}