summaryrefslogtreecommitdiff
path: root/timeutil
diff options
authorMaciej Borzecki <maciej.zenon.borzecki@canonical.com>2018-02-19 18:27:33 +0100
committerMaciej Borzecki <maciej.zenon.borzecki@canonical.com>2018-02-19 18:27:33 +0100
commita7ab32b84631e17990d230ee682984fb68ed5b3f (patch)
tree2789f156aeccab05b498c5b72594048ae3fa5e63 /timeutil
parent0a0ce303499d4ff088327ce4b437091d4ec09909 (diff)
timeutil: use standard notation for time intervals
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Diffstat (limited to 'timeutil')
-rw-r--r--timeutil/schedule.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/timeutil/schedule.go b/timeutil/schedule.go
index af281928a6..8772705284 100644
--- a/timeutil/schedule.go
+++ b/timeutil/schedule.go
@@ -711,7 +711,7 @@ func parseEventSet(s string) (*Schedule, error) {
// Includes checks whether given time t falls inside the time range covered by
// the schedule. A single time schedule eg. '10:00' is treated as spanning the
-// time <10:00, 10:01)
+// time [10:00, 10:01)
func (sched *Schedule) Includes(t time.Time) bool {
if len(sched.WeekSpans) > 0 {
var weekMatch bool
@@ -730,11 +730,11 @@ func (sched *Schedule) Includes(t time.Time) bool {
window := tspan.Window(t)
if window.End.Equal(window.Start) {
// schedule granularity is a minute, a schedule '10:00'
- // in fact is: <10:00, 10:01)
+ // in fact is: [10:00, 10:01)
window.End = window.End.Add(time.Minute)
}
- // Includes() does the <start,end> check, but we really what
- // <start,end)
+ // Includes() does the [start,end] check, but we really what
+ // [start,end)
if window.Includes(t) && t.Before(window.End) {
return true
}