|
|
@ -73,3 +73,13 @@ func (t Timestamp) NowSub() time.Duration {
|
|
|
|
func (t Timestamp) Sub(t2 time.Time) time.Duration {
|
|
|
|
func (t Timestamp) Sub(t2 time.Time) time.Duration {
|
|
|
|
return t2.Sub(t.Time())
|
|
|
|
return t2.Sub(t.Time())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// After 是否在指定時間後
|
|
|
|
|
|
|
|
func (t Timestamp) After(t2 time.Time) bool {
|
|
|
|
|
|
|
|
return t.Time().After(t2)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// AfterNow 是否在目前時間後
|
|
|
|
|
|
|
|
func (t Timestamp) AfterNow() bool {
|
|
|
|
|
|
|
|
return t.After(time.Now())
|
|
|
|
|
|
|
|
}
|
|
|
|