Refactored time filter.
This commit is contained in:
parent
4c908f4891
commit
9700bc9d3c
16 changed files with 252 additions and 296 deletions
|
|
@ -63,7 +63,7 @@ func applyTimeOffset(t time.Time, duration time.Duration, amountStr string) time
|
|||
|
||||
return t.Add(duration * time.Duration(amount))
|
||||
} // }}}
|
||||
func presetTimeInterval(duration time.Duration, presetStr string, timeFrom, timeTo *time.Time) () {
|
||||
func presetTimeInterval(duration time.Duration, presetStr string, timeFrom, timeTo *time.Time) () {// {{{
|
||||
if presetStr == "" {
|
||||
return
|
||||
}
|
||||
|
|
@ -73,4 +73,4 @@ func presetTimeInterval(duration time.Duration, presetStr string, timeFrom, time
|
|||
(*timeFrom) = now.Add(duration * -1 * time.Duration(presetTime))
|
||||
(*timeTo) = now
|
||||
return
|
||||
}
|
||||
}// }}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue