Skip to content

Commit

Permalink
docs: IsValid usage
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Apr 21, 2021
1 parent be0762d commit 0e95143
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ import (
gron := gronx.New()
expr := "* * * * *"

// check if expr is due for current time
gron.IsDue(expr)
// check if expr is even valid, returns bool
gron.IsValid(expr) // true

// check if expr is due for current time, returns bool and error
gron.IsDue(expr) // true|false, nil

// check if expr is due for given time
gron.IsDue(expr, time.Date(2021, time.April, 1, 1, 1, 0, 0, time.UTC))
gron.IsDue(expr, time.Date(2021, time.April, 1, 1, 1, 0, 0, time.UTC)) // true|false, nil
```

---
Expand Down

0 comments on commit 0e95143

Please sign in to comment.