fleshing out

This commit is contained in:
gorhill 2013-08-29 20:06:45 -04:00
parent 9774af70ea
commit a8244603b5
1 changed files with 2 additions and 0 deletions

View File

@ -92,4 +92,6 @@ to create a `CronExpression` object once and keep a copy of it for reuse:
cronexpr := cronexpression.NewCronExpression("0 0 29 2 *") cronexpr := cronexpression.NewCronExpression("0 0 29 2 *")
nextTime := cronexpr.NextTime(time.Now()) nextTime := cronexpr.NextTime(time.Now())
`Use cronexpression.NoMatch(nextTime)` to find out whether a valid time was returned. For exemple, `cronexpression.NoMatch(cronexpression.NextTimeFromCronString("* * * * * 1980", time.Now()))` will return `true`, whereas `cronexpression.NoMatch(cronexpression.NextTimeFromCronString("* * * * * 2050", time.Now()))` will return false (as of 2013-08-29...)