This commit is contained in:
gorhill
2013-08-31 08:23:51 -04:00
parent e41acb76c8
commit 8af06bafc9
2 changed files with 132 additions and 132 deletions

View File

@@ -83,10 +83,10 @@ Assuming `time.Now()` is "2013-08-29 09:28:00", then `nextTime` will be "2016-02
You can keep the returned Expression pointer around if you want to reuse it:
cronexpr := cronexpression.Parse("0 0 29 2 *")
nextTime := cronexpr.Next(time.Now())
expr := cronexpression.Parse("0 0 29 2 *")
nextTime := expr.Next(time.Now())
...
nextTime := cronexpr.Next(nextTime)
nextTime := expr.Next(nextTime)
Use `time.IsZero()` to find out whether a valid time was returned. For example,